jQuery: minified vs. packed

71 views
Skip to first unread message

FND

unread,
Jan 29, 2009, 4:41:45 AM1/29/09
to TiddlyWikiDev
With the upcoming inclusion of jQuery in the TiddlyWiki core, we've been
pondering whether to use the minified or the packed version.

As of jQuery 1.3, there is no official packed version anymore[1]:
"Packed scripts are slower for the user [...] the final load time ends
up being much higher [...] due to the decompression step"

However, the minified version is ~25 kB larger than the packed one[2].

So we have to decide what's more important - filesize or startup time.
While the former has always been an important factor (though perhaps
mostly psychological), it might not be worth sacrificing performance for.

We'll do some profiling of our own to determine how significant this
difference really is.


-- F.


[1] http://blog.jquery.com/2009/01/21/jquery-131-released/
[2] http://code.google.com/p/jqueryjs/downloads/list?q=1.2.6

Saq Imtiaz

unread,
Jan 29, 2009, 8:33:44 AM1/29/09
to TiddlyWikiDev
I think profiling is definitely needed before a decision can be made
on this. Note that TinyTiddly has been using the minified "slower"
type of compression since the beginning and no one has noticed or
remarked on any difference in performance as compared to the regular
version of TiddlyWiki. TinyTiddly may also prove useful for purposes
of profiling the performance effects of minifying. ( http://tinytiddly.lewcid.org)

Saq

FND

unread,
Feb 5, 2009, 9:58:55 AM2/5/09
to Tiddly...@googlegroups.com
After some deliberation, we think that using the packed version in the
TiddlyWiki core is not a good idea:
* web servers usually support compression via gzip
* the decompression is fairly slow in JavaScript[1]
* packed code makes debugging very painful
* packing can introduce bugs
* packed scripts are almost impossible to read, which breaks TiddlyWiki's
"view source" paradigm (even though minified scripts are compressed as
well, the obfuscation isn't as comprehensive)
* packing requires additional effort when creating a release
* the jQuery team doesn't provide a packed version anymore, and creating
a custom derivative should generally be avoided

In contrast, we couldn't make out any tangible benefits for using a
packed version - apart from the vague and possibly unjustified filesize
concern.

Also, there's always TinyTiddly[2] for when filesize really matters.

Any objections?


-- F.


[1] http://ejohn.org/blog/library-loading-speed/
[2] http://www.tiddlywiki.org/wiki/TinyTiddly

Daniel Baird

unread,
Feb 10, 2009, 6:21:52 AM2/10/09
to Tiddly...@googlegroups.com
I get the feeling that people only look at (and complain about) their
file size after they've noticed their TW is running slow. So I guess
perceived speed is more important.

;Daniel
--
Daniel Baird
I've tried going to the XHTML <bar /> a few times, but it's always closed.

Alex Hough

unread,
Feb 10, 2009, 11:14:35 AM2/10/09
to Tiddly...@googlegroups.com
The feeling of smoothness and safety help ease my mind in TiddlyWorld.
When it is slow and smooth, it feels good.

hope this helps

Alex

2009/2/10 Daniel Baird <danie...@gmail.com>:
--
t: 0161 442 2202
m: 0781 372 50 17
skype: alexhough
delicious: alexhough
Reply all
Reply to author
Forward
Message has been deleted
0 new messages