Re:90% Good parts of jQuery - at only 13% of the size
by numlocked on Saturday November 19, 2011 @07:34PM
(#3256825)
Interesting. Is parse time generally a function of code length, or overall complexity/CPU time?
[ Parent
| on HN ]
Re:90% Good parts of jQuery - at only 13% of the size
by pamelafox on Saturday November 19, 2011 @07:42PM
(#3256849)
(I'm not an expert) but it's more than simply code length - it also depends on if the library runs any functions at parse time, and perhaps also how many variables it puts in the global space.
For example: I discovered that my tiny localStorage library was taking 300ms to load, and that was because I was doing feature detection at parse-time and that feature detection attempted to actually set an item in localStorage. I postponed that, and got the load time down to 20ms.