#7992 closed bug (wontfix)
jQuery 1.5b1 is slower to remove elements than 1.4.2
Reported by: | Owned by: | snover | |
---|---|---|---|
Priority: | blocker | Milestone: | 1.5 |
Component: | manipulation | Version: | 1.5b1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Adding and removing elements in 1.5b1 is noticably slower than in 1.4.2 (it was also slower in 1.4.3 and 1.4.4
Change History (15)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Component: | unfiled → manipulation |
---|---|
Priority: | undecided → blocker |
Status: | new → open |
comment:3 Changed 13 years ago by
Please see this related bug http://bugs.jquery.com/ticket/7338 This broke in 1.4.3
comment:5 Changed 13 years ago by
Milestone: | 1.next → 1.5 |
---|---|
Owner: | set to snover |
Status: | open → assigned |
comment:7 Changed 13 years ago by
The issue is traceable to the extra work being performed in cleanData()
comment:9 Changed 13 years ago by
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
There were virtually no changes to cleanData in 1.5 - only the addition of some minor property lookups. There's really nothing that we can do to make this much faster.
comment:10 Changed 13 years ago by
So this was slow enough for us that we could not upgrade from 1.4.2 ro 1.4.3 in our app. People complained when we switched. I really think that its important that things don't get noticeably slower between releases.
comment:11 Changed 13 years ago by
How many elements are you removing from your page at once? Worst-case benchmarking on 1.5b in IE was something like 0.027ms per element. Based on the information and testcase provided, problems here would tend to suggest an architectural issue with your app rather than a problem in the lib; you would need to be removing tens of thousands of elements per second for the problem to be noticeable, unless there is a significant difference between the testcase and your app (like lots of bound events).
comment:12 Changed 13 years ago by
So it was removing one element but there were a lot of elements inside of it. It was extremely poor on IE which forced us to revert to 1.4.2
comment:13 Changed 13 years ago by
Anonymous,
This ticket was addressed today at our weekly jQuery meeting, which is a public discussion on IRC int he #jquery-meeting channel.
During the discussion, this perf test: http://jsperf.com/jquery-remove was created and we can agree that there is not a significant slow down.
If you could try 1.5b and report your findings, that would be very helpful to us.
comment:14 Changed 13 years ago by
So we used the same test you provided on IE8 and its 61% slower
http://www.screencast.com/users/JoeG816/folders/Jing/media/372a1b29-5cef-44a9-9c49-989ed1dc7d67
There is clearly a problem here - its the same performance issue that we began to see on 1.4.3.
comment:15 Changed 13 years ago by
I would also add that the same test http://jsperf.com/jquery-remove runs 38% lowers on FF 3.6 with 1.5 vs 1.4.2.
http://jsperf.com/jquery142-vs-jquery-15b1