Skip to content

Some minor `$.ajaxJSONP` optimizations #99

Merged
1 commit merged into from Feb 21, 2011

2 participants

@mathiasbynens

I noticed $.ajaxJSONP could be optimized, so I went ahead and made some changes. It’s more readable this way (IMHO), but also faster (fact!). Just check out the diff :) Oh, and as a bonus, it’s also smaller in size :)

Before:

Original version: 18.342k

Minified: 10.346k

Minified and gzipped: 3.939k, compression factor 4.656

After:

Original version: 18.263k

Minified: 10.304k

Minified and gzipped: 3.924k, compression factor 4.654

@andremedeiros

Doesn't this create a memory leak again?

Why would this create a memory leak?

Ah, I see now. I’ve made the mistake of editing the latest official Zepto release (linked to from the website) and copy-pasting the changes into the repo; effectively overwriting your changes. Sorry, I really didn’t mean to! Thanks for letting me know, I’ll update my pull request ASAP.

Can't really claim those changes as being mine, but you're welcome anyway ;-)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.