Fixes #7396: Selectable _create() slow on IE6 with large number of selectees #524

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@ghostd

ghostd commented Nov 12, 2011

The position (offset and width/height) computation is only used by the '_mouseDrag' method. So, by moving the computation in '_mouseStart' method:

  • we are removing useless (and sometimes slow on big selectable) computations from widget initialization
  • we are computing the position for all 'selectees' in one shot and using the browser cache: since we are not changing the render (by adding/removing CSS class) between the different calls to offset/outerWidth/outerHeight, the browser does not need recompute the render and can cache some results
Fixes #7396: Selectable _create() slow on IE6 with large number of se…
…lectees

The position (offset and width/height) computation is only used by the '_mouseDrag' method. So, by moving the computation in '_mouseStart' method:
- we are removing useless (and sometimes slow on big selectable) computations from widget initialization
- we are computing the position for all 'selectees' in one shot and using the browser cache: since we are not changing the render (by adding/removing CSS class) between the different calls to offset/outerWidth/outerHeight, the browser does not need recompute the render and can cache some results
@scottgonzalez

This comment has been minimized.

Show comment
Hide comment
@scottgonzalez

scottgonzalez Nov 17, 2011

Member

The refresh method should be able to be called at any time, including during a selection. This breaks that functionality by clearing the data on refresh.

Member

scottgonzalez commented Nov 17, 2011

The refresh method should be able to be called at any time, including during a selection. This breaks that functionality by clearing the data on refresh.

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