Skip to main content

Bug Tracker

Side navigation

#7992 closed bug (wontfix)

Opened January 17, 2011 09:31PM UTC

Closed January 24, 2011 06:34PM UTC

Last modified February 01, 2011 02:54AM UTC

jQuery 1.5b1 is slower to remove elements than 1.4.2

Reported by: brad@assistly.com 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/

Attachments (0)
Change History (15)

Changed January 17, 2011 10:20PM UTC by rwaldron comment:1

Changed January 17, 2011 10:22PM UTC by rwaldron comment:2

component: unfiledmanipulation
priority: undecidedblocker
status: newopen

Changed January 17, 2011 10:26PM UTC by anonymous comment:3

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

Changed January 17, 2011 10:49PM UTC by rwaldron comment:4

Changed January 17, 2011 10:50PM UTC by john comment:5

milestone: 1.next1.5
owner: → snover
status: openassigned

Changed January 20, 2011 12:29AM UTC by rwaldron comment:6

#8013 is a duplicate of this ticket.

Changed January 20, 2011 04:15AM UTC by rwaldron comment:7

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

Changed January 24, 2011 06:31PM UTC by john comment:8

Changed January 24, 2011 06:34PM UTC by john comment:9

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.

Changed January 24, 2011 06:44PM UTC by anonymous comment:10

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.

Changed January 24, 2011 07:33PM UTC by snover comment:11

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).

Changed January 24, 2011 07:49PM UTC by anonymous comment:12

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

Changed January 24, 2011 08:22PM UTC by rwaldron comment:13

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.

Changed February 01, 2011 02:49AM UTC by brad@assistly.com comment:14

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.

Changed February 01, 2011 02:54AM UTC by brad@assistly.com comment:15

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.