Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
None
-
6.8
-
13
-
Foundation Sprint 110, Foundation Sprint 111
Description
The filter feGaussianBlur is slow due to the native implementation of the calculation of the pixel average especially with increasing zoom factors (O(n⁴)).
This can be improved (O(n²)) with some known tricks:
- assume you often calculate the average pixel values for sub-rects - how do you optimize that?
- solution:
- create a table of the size of the image, containing the sum of the values of all pixels above and left of it (including that pixel)
- to find any rect's average value: bottom right corner - top-left - bottom-left + top-left from table (check for off by one)