Drawing Images at custom sizes draws images using handle created at a given size and width. When a user is scrolling around in a diagram, an image may be redrawn often but always at the same size. The size will only be changed if he or she changes the diagram zoom. This would now result in a handle created each time the image is redrawn
To adress this, a caching mechanism might just cache the last created temporary handle. As soon as a temporary handle for a different size is requested, the old handle is disposed and the cached one is replaced with the new one.
Originally posted by @HeikoKlare in #326