Side navigation
#2972 closed enhancement (wontfix)
Opened June 03, 2008 05:24PM UTC
Closed June 12, 2008 11:21PM UTC
curCSS Really slow
Reported by: | malfist | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.3 |
Component: | core | Version: | 1.2.5 |
Keywords: | optimization | Cc: | |
Blocked by: | Blocking: |
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 (1)
Change History (3)
Changed June 04, 2008 03:48PM UTC by comment:1
Changed June 04, 2008 04:02PM UTC by comment:2
I commented out it's entire contents and had no adverse effects. I gained considerable increase in responce time.
Changed June 12, 2008 11:21PM UTC by comment:3
resolution: | → wontfix |
---|---|
status: | new → closed |
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
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.