Open Bug 1100061 Opened 10 years ago Updated 2 years ago

Gravity Demo Very Slow

Categories

(Core :: Graphics: Canvas2D, defect)

33 Branch
x86_64
Linux
defect

Tracking

()

People

(Reporter: sstangl, Unassigned)

References

()

Details

The demo at http://www.stephenbalaban.com/wp-content/uploads/2014/11/Gravity.html runs very slowly in Firefox, but quickly in Chrome.

The built-in profiler shows that ~80% of the time is spent in the following function:

>    function transform(transforms, ctx) {
>        ctx.translate(w/2, h/2);
>        ctx.scale(1,-1);
>        var len = transforms.length;
>        for (var i = 0; i < len; ++i) {
>            var m = transforms[i];
>            ctx.save();
>            ctx.transform(m[0], m[3], m[1], m[4], m[2], m[5]);
>        }
>        return ctx;
>    }
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.