Bug Tracker

Modify

Ticket #2972 (closed enhancement: wontfix)

Opened 5 years ago

Last modified 5 years ago

curCSS Really slow

Reported by: malfist Owned by:
Priority: minor Milestone: 1.3
Component: core Version: 1.2.5
Keywords: optimization Cc:
Blocking: Blocked by:

Description

I was running firebug's profiler over my webapp and found that the function using the most processor time (although it does not have the longest execution time) is curCSS. I dug around in the source code of Jquery and found it. It's a helper method and it plays with the DOM, the slowest part of javascript. Considering most good programmers don't need this (they do it already), it's redundant and a pointless waste.

Could this be changed to an opt-in function instead of a default?

Attachments

profile.pdf Download (59.0 KB) - added by malfist 5 years ago.
The profile log.

Change History

Changed 5 years ago by malfist

The profile log.

comment:1 Changed 5 years ago by flesler

curCSS is used a LOT all over the source. It's not just the external use, it's widely used internally for dimensions, animations, offset, etc. And it cannot be optional... it's totally necessary.

comment:2 Changed 5 years ago by malfist

I commented out it's entire contents and had no adverse effects. I gained considerable increase in responce time.

comment:3 Changed 5 years ago by flesler

  • Status changed from new to closed
  • Resolution set to wontfix

Well.. I was curious about this, commented all the function and ran the test suite.

100 tests of 1134 failed.

They belong to fx, dimensions, css, width/height and a few more single tests.

This shows that the function isn't used everywhere, but only by certain modules. You probably don't use them so it doesn't fail (or maybe it does fail and you don't notice).

Anyway.. all the mentioned modules are included into the core, and need to be supported.

You can always make your own build of jQuery, removing w/e you prefer.

Thanks

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.