Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#7992 closed bug (wontfix)

jQuery 1.5b1 is slower to remove elements than 1.4.2

Reported by: brad@… 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

http://jsfiddle.net/F4TDA/1/

Change History (15)

comment:2 Changed 8 years ago by Rick Waldron

Component: unfiledmanipulation
Priority: undecidedblocker
Status: newopen

comment:3 Changed 8 years ago by anonymous

Please see this related bug http://bugs.jquery.com/ticket/7338 This broke in 1.4.3

comment:5 Changed 8 years ago by john

Milestone: 1.next1.5
Owner: set to snover
Status: openassigned

comment:6 Changed 8 years ago by Rick Waldron

#8013 is a duplicate of this ticket.

comment:7 Changed 8 years ago by Rick Waldron

The issue is traceable to the extra work being performed in cleanData()

comment:8 Changed 8 years ago by john

comment:9 Changed 8 years ago by john

Resolution: wontfix
Status: assignedclosed

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 8 years ago by anonymous

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 8 years ago by snover

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 8 years ago by anonymous

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 8 years ago by Rick Waldron

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 8 years ago by brad@…

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 8 years ago by brad@…

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.

Note: See TracTickets for help on using tickets.