Big drop in Graphics performance with introduction of updateLocalBounds() after internal drawing functions. #2618

Closed
pengchuan opened this Issue Jul 12, 2016 · 1 comment

Projects

None yet

2 participants

@pengchuan
pengchuan commented Jul 12, 2016 edited

I understand that the inclusion of this function is necessary for checking bounds of graphics objects (fix for #2573 - commit 4066a8d on 29 Jun 2016). However, since its inclusion, my application (which involves drawing charts with lots of lineTo() calls on full browser dimensions) performance has dropped significantly such that the entire application lags for almost 1s just to get a full redraw, which did not happen in 2.5.0.

Is it possible to have a flag that disables this bounds update for applications that do not need it?

Appreciate any help with this. Thanks!

@photonstorm photonstorm added a commit that referenced this issue Jul 23, 2016
@photonstorm As a result of changes in #2573 Graphics objects were calling `update…
…LocalBounds` on any shape change, which could cause dramatic performances drops in Graphics heavy situations (#2618). Graphics objects now have a new flag `_boundsDirty` which is used to detect if the bounds have been invalidated, i.e. by a Graphics being cleared or drawn to. If this is set to true then `updateLocalBounds` is called once in the `postUpdate` method (thanks @pengchuan #2618)
ce764e0
@photonstorm
Owner

Thanks for submitting this issue. We have fixed this, and the fix has been pushed to the dev branch. Let me know if it works better for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment