Answer the question
In order to leave comments, you need to log in
What could be the reason for Firefox's performance drop when working with Canvas?
I don’t understand well what is under the hood of browsers, so I don’t always understand the behavior of scripts.
Just such an example.
I would be grateful if someone who understands will take the time.
Perhaps in the example I am not releasing something for the GC to work on or something like that?
The script is simple, it is here: kityan.github.io/simpleAnaglyphMaker
The sequence is as follows:
- select the left image
- select the right image
- click "Create anaglyph" and get an anaglyph image on the canvas
You can take the same image, it does not matter. But you need to try on rather big pictures, for example 2592x1944. You can take these:
https://github.com/kityan/simpleAnaglyphMaker/tree...
So. In the main function that parses the channels of two images, I measure the cycle (see the output to the console)
And here in Chrome it takes the same time, regardless of the number of repeated clicks "Create Anaglyph"
And in Firefox, for example, for the tenth time time jumps by an order of magnitude and no longer decreases.
Why is that?
Browsers under Windows 7. Firefox: 40, Chrome: 45
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question