News for hackers. Stuff that matters.
Re:90% Good parts of jQuery - at only 13% of the size by pamelafox on Saturday November 19, 2011 @07:31PM (#3256813)
The parse time is significant for jQuery, atleast on some mobile devices. For example, in my tests on an Android N1 today, jQuery took 800ms to parse (even when cached) whilst Zepto took 300ms -- saving 500ms.
Re:90% Good parts of jQuery - at only 13% of the size by DiabloD3 on Saturday November 19, 2011 @07:36PM (#3256834)
Google in their Page Speed ranking consider 100kb == 100ms.

See: https://code.google.com/speed/page-speed/docs/mobile.html#De...

BTW, their Page Speed thing is now available online: https://developers.google.com/pagespeed/

Re:90% Good parts of jQuery - at only 13% of the size by agentgt on Sunday November 20, 2011 @09:09AM (#3258118)
I wonder if there is any better optimization that browsers can do for this (like at least cache the AST if the exact same JS is loaded).
Re:90% Good parts of jQuery - at only 13% of the size by dextorious on Sunday November 20, 2011 @03:30AM (#3257628)
Parent talks about parsing speed.
Re:90% Good parts of jQuery - at only 13% of the size by DiabloD3 on Sunday November 20, 2011 @01:22PM (#3258629)
So does Google.
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?
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.

Re:90% Good parts of jQuery - at only 13% of the size by ruethewhirled on Sunday November 20, 2011 @02:54PM (#3258855)
Do you mind sharing what are you using/doing to benchmark that? cheers