Opened 13 years ago
Last modified 10 years ago
#5190 open feature
Draggable: Performance problems due to css calculations
Reported by: | sorcK | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 2.0.0 |
Component: | ui.draggable | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When having 200+ droppables it takes several seconds for a drag to start, and moving the draggable lags.
problem occured on ubuntu and windows vista,7 with firefox 3.5.7 , 3.6 using a highend pc
Change History (5)
comment:1 Changed 12 years ago by
comment:2 Changed 11 years ago by
It seems (according to quick researches with firebug profiler) that a lot of time is spent in getComputedStyle: because the render of nodes is modified in many ways (adding/removins classes and changing CSS position) and _create method call'.csc('position') to check the current node position.
A first (very little) optimization could be replace the following code (from '_create' draggable method)
(this.options.addClasses && this.element.addClass("ui-draggable")); (this.options.disabled && this.element.addClass("ui-draggable-disabled"));
by
var uiClasses = this.options.addClasses ? "ui-draggable" : ""; uiClasses += this.options.disabled ? " ui-draggable-disabled" : ""; (uiClasses.length && this.element.addClass(uiClasses));
comment:3 Changed 11 years ago by
Type: | enhancement → feature |
---|
comment:4 Changed 10 years ago by
Milestone: | 1.9.0 → 2.0.0 |
---|
comment:5 Changed 10 years ago by
Component: | ui.droppable → ui.draggable |
---|---|
Status: | new → open |
Summary: | UI Droppable , UI Draggable: Performance problems → Draggable: Performance problems due to css calculations |
This ticket in core will do lots to help: http://bugs.jquery.com/ticket/11938
I'm having the same problem in my ASP.NET application. It's fine in any other browser but in IE8 it takes 10+ seconds to load the page just because there are so many droppables in my table. Please provide help asap.