How does the optimization of Canvas drawImage work?
问题 Problem I tried to create a particle system using a Canvas. Interestingly the method drawImage is very fast. I got to 90.000 particles at 60 fps, even using drawImage. However, that was only with the same image. When I used different images for the particles the performance dropped down considerably. Then I changed the order of the images, so that e. g. first all particles of image1 are drawn, then all of image2, etc and the performance was good again. Question Does anyone know why that is?