Jump to content

jQuery fadeOut() too much CPU


The Little Guy

Recommended Posts

I have been building a home page, and I have a script that fades images out for a slide show.

 

for testing purposes, I made two scripts, one uses jQueries fadeOut() function an another is a jQuery plugin I made without the use of fadeOut().

While testing, I opened chrome's "background pages" tool, and watched the site. Whenever jQuery's fadeOut() function was triggered, the cpu went up to about 50%. When I tested my plugin the cpu only went up to 32%.

 

jQuery's: ciaobellaphotography.us

My jQuery plugin: ciaobellaphotography.us/index2.php

 

Do you guys see any noticeable difference between the two or have any additional thoughts?

Link to comment
https://forums.phpfreaks.com/topic/266308-jquery-fadeout-too-much-cpu/
Share on other sites

ciaobellaphotography.us - memory is around ~78,000-83,000K, CPU peaks at about 24% briefly, Javascript memory is ~13,000K

 

ciaobellaphotography.us/index2.php - memory is around ~46,000-58,000K - CPU peaks at 18-20% briefly, Javascript memory is ~8,000K

 

So, it looks like index2.php performs a tiny bit better. As far as unresponsiveness or any visual lag, I don't notice any between the two on my machine.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.