tags:

views:

72

answers:

1

JQuery is progressively becoming bigger and bigger. But, for me 50% of functionality is never used. For example, I never use wrap() and I dont need live(). In addition to this, I never use most of selectors.

Are there projects, that create smaller cut-down packs of the jquery library?

+3  A: 

Not that I am aware, and probably for good reason.

You may never use some of these things explicitly, but you may find that some of the functionality you don't use is used implicitly by the jQuery functions you do call.

I suspect that isolating and untying aspects of jQuery in the way that you want is not actually that easy due to inherent interdependency.

There is also supportablility aspect. If we could get cut-down versions of jQuery in this way then it may open the library up to unpredicted bugs. Imagine the difficulty the jQuery team would have in supporting a library that could have hundreds, possibly thousands of physical versions around the world, all of which might be full size, minified and gzipped.

And then, how would you manage upgrades, bug fixes. Future versions of jQuery would have to interdepend in the same way to ensure you can selectively chose the items you want with each new version.

The fact of the matter is that jQuery isn't that big:

  • Production (23KB, Minified and Gzipped)
  • Development (156KB, Uncompressed Code)

So, you're as well including the whole thing.

I realise that the jQuery UI allows you to do something like this, but that is a series of independent and isolated modules built upon the core framework that can be issued, changed and supported independently.

James Wiseman
1.2.3 - 15 KB, 1.2.6 - 16 KB, 1.3.2 - 19KB. 65% of growth.
dynback.com
My stats say 53%, but regardless, its negligible in the grand scale fo things. Have you optimised everything else, e.g. your images. These are bound to take up more.
James Wiseman
http://www.slideshare.net/jeresig/recent-changes-to-jquerys-internals5 slide: I found that modularity exists
dynback.com
Yes, but it says nothing about anything prior to it or makes any comment about future versions.
James Wiseman