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, 0, 0);
    return img;
}

```

I have run a profiling and I have seen that when I call this method "put", the application slows down incredibly. What could be the reason ?

Thank you very much.

Best Regards