Java Hashtable put method slow down my application
问题 I need to do : Dictionary cache; cache = new Hashtable(); this.getDocument().putProperty("imageCache", cache); Then I have a method who does : cache.put(url, picture); Where picture is an Image object. I create this way : public Image getSmiley(String smileyName) { BufferedImage img = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB); Graphics g = img.getGraphics(); ImageIcon myicon = new ImageIcon(getClass().getResource("/ola/smileys/" + smileyName + ".png")); myicon.paintIcon(null, g,