Widget: Increase performance for large sortable/draggable collections#2313
Draft
mgol wants to merge 1 commit intojquery:mainfrom
Draft
Widget: Increase performance for large sortable/draggable collections#2313mgol wants to merge 1 commit intojquery:mainfrom
mgol wants to merge 1 commit intojquery:mainfrom
Conversation
mgol
commented
Nov 19, 2024
| this._destroy(); | ||
| $.each( this.classesElementLookup, function( key, value ) { | ||
| that._removeClass( value, key ); | ||
| that._removeClass( $( Array.from( value ) ), key ); |
Member
Author
There was a problem hiding this comment.
I'm not that worried about this since it's in destroy. That shouldn't happen too often.
mgol
commented
Nov 19, 2024
|
|
||
| // Clean up events and states | ||
| this.bindings.off( this.eventNamespace ); | ||
| $( Array.from( this.bindings ) ).off( this.eventNamespace ); |
Member
Author
There was a problem hiding this comment.
I'm not that worried about this since it's in destroy. That shouldn't happen too often.
mgol
commented
Nov 19, 2024
| // below. | ||
| elements = $( currentElements.get() ); | ||
| this._removeClass( currentElements, classKey ); | ||
| elements = $( Array.from( currentElements ) ); |
Member
Author
There was a problem hiding this comment.
We re-wrap here, but the previous code was already creating a new jQuery object, so it shouldn't be worse than before.
Also, I don't understand the comment above; how would we lose the reference here? It's already in the currentElement object, that wouldn't just disappear...
c2e2519 to
67457c4
Compare
67457c4 to
47244bf
Compare
melloware
approved these changes
Jul 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes gh-2062