jquery replacement
as i begin to make mobile apps, it’s become painfully clear that i simply don’t have the performance i’m used to in a browser. while i write fast javascript, i am stuck using jquery for the time being. I’m not a jQuery fan, but i’m not out to get it either. it is what it is, and it works.
The problem is that it works slowly. I re-wrote the fade routine a few months back. mine uses 1/3 the cpu of jQuery’s native routine. I wanted more than just faster fades, i want fast everything, so i began another library.
I don’t think it will replace jQuery, which at this point has a million nooks and crannies to replaicate. After reviewing what i use jQuery for, and what takes a long time to run, i’ve settled a a subset of functionality. The syntax is similar, but not compatible with jQuery.
On the technical end, it’s based around Arrays of elements instead of jQuery’s custom objects. This lets me use [].map(), [].filter(), etc on the result set. The css selector is next gen: querySelectorAll() only, no backwards css path decoding codebase. I have the usual methods like show, attr, html, hide, each, toggle, css, events, etc at least partially working.
the whole thing is currently ~2kb compressed, and performs about 8-12X faster than jQuery.
It’s complimenting to jQuery and does the same basic things, but fast.
if anything becomes of it, i’ll let you know.