Opened 15 years ago
Closed 15 years ago
#2972 closed enhancement (wontfix)
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 (4)
Changed 15 years ago by
Attachment: | profile.pdf added |
---|
comment:1 Changed 15 years ago by
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 15 years ago by
I commented out it's entire contents and had no adverse effects. I gained considerable increase in responce time.
comment:3 Changed 15 years ago by
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
The profile log.