Any way to enhance jquery?
Posted June 11th 2012, 5:25am
I'm just wondering as at times it's very slow...Is there any way to enhance jquery to go faster?
φ
Posts: 237
Joined: October 29th 2011, 11:00pm
Location: england, united kingdom, stoke on trent
Likes Given: 20
Likes Received: 4
Any way to enhance jquery?
Posted June 11th 2012, 11:48am
The best way to make jQuery run faster is to not use it. ;)

http://www.dion-designs.com/blog/index. ... c=5&t=8775

Another way is to use an older version. The newest versions have IMO become too large for their own good, and performance has suffered. I use version 1.5.1 on this site and am thinking about rolling back to 1.4.2.
φ
Posts: 1600
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 357
Any way to enhance jquery?
Posted June 11th 2012, 2:12pm
As Dion says, rolling back a few copies will get rid of a lot of junk from it that's never used.

Most importantly, learning what the functions are actually doing would help a lot. Once you understand what each function is doing backstage, you'll know how to use them more efficiently.
φ
Posts: 509
Joined: July 9th 2011, 11:00pm
Location: England
Likes Given: 15
Likes Received: 26
Any way to enhance jquery?
Posted June 11th 2012, 7:47pm
I highly appreciate your replies.
I've learned so much more from you two, and zero, I seriously think if one of you guys get enough money, should start up a class in web design, a very own college if possible! ;)
φ
Posts: 237
Joined: October 29th 2011, 11:00pm
Location: england, united kingdom, stoke on trent
Likes Given: 20
Likes Received: 4
Any way to enhance jquery?
Posted June 12th 2012, 8:36am
Rolling back your jQuery version could possibly introduce new bugs to your code. Besides, the never versions have much faster execution time; the team is always optimizing the speed of the library. If you want smaller file size, you're better off using a mode modular framework/library such as Ender or Dojo.
φ
Posts: 64
Joined: June 17th 2011, 11:00pm
Location: 127.0.0.1/
Likes Given: 3
Likes Received: 2
Any way to enhance jquery?
Posted June 12th 2012, 11:38am
Actually I've found that using the "latest and greatest" introduces FAR more bugs to code than using something that has been thoroughly tested in the real world. :P

As for execution times...it's a case of "lies, damn lies, and statistics".

The code execution times reported by the jQuery folks don't take into account the ever-increasing overhead of jQuery itself. The last version of jQuery where there was a performance increase in real-world production code was 1.4. There was a noticeable drop-off in performance after 1.5, and that's why I cannot ever see using any version of jQuery from 1.6 onwards.
φ
Posts: 1600
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 357
Any way to enhance jquery?
Posted June 18th 2012, 11:14am
Okay, cool.

What is your opinion on smaller libraries/modules focusing mainly on one task?
φ
Posts: 64
Joined: June 17th 2011, 11:00pm
Location: 127.0.0.1/
Likes Given: 3
Likes Received: 2
Any way to enhance jquery?
Posted June 20th 2012, 1:23am
I actually like the idea of having small(er) libraries. For example, it's my opinion that since 1.6, events and AJAX should be jQuery plugins. Both have grown too large to be in the jQuery core.

I'm actually using one such single-task jQuery plugin on a site I'm developing...it allows jQuery to animate the CSS background-position property. Since I need nothing more, the site is using jQuery 1.4.1.
φ
Posts: 1600
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 357

Who is online

Users browsing this forum: No registered users and 1 guest