Project:jQuery Eye Candy
Version:6.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I'm about to replace all image decorations with jquery effects. Will there be a performance hit? Does anyone know how much?

Is this a very bad idea and should I be more restrained?

I'm looking at a reflection, several gradients and half a dozen curvy corners per page, thanks.

Comments

#1

Hi Miraploy,

I am not a maintainer nor a developer. Although I can't give you a straight answer I could elaborate on an answer: First of all, there are two things that could make your website slower (that you can control):
1. Download time.
2. JavaScript performance/loading performance in browser.

1. The change in download time is a constant, say k added to your total time to download the website. That constant k will depend on 1. what kind of JQuery plugins you are using and 2. whether they are minimized/packed or not.

2. I think the effects you are mentioning all are loaded when the page are loaded and therefor the question is whether the initial page loading time will increase. They will, and how much also depends on what kind of parameters you add to the plugins. For example anti aliased curvy corners will add (a small) extra loading time.

Reading what plugins you are planning to use (and how few instances of them) I believe your biggest bottleneck will be in 1. (ie. downloading time).

Both of the two performance issues above can be investigated further with firebug (plugin for Firefox). Firebug has a feature where you can see specifically the loading time of a webpage for each file downloaded (don't forget to enable JavaScript compression in Drupal when testing this). Firebug also contains a JavaScript profiler which (i think) could be used to see exactly how much time each plugin will add until the page is fully loaded.

There are profilers for other browsers, but firebug is definitely the one I would start with.

I know I just gave you a fuzzy answer but as long as no expert is answering your questions I suggest trying out optimizing yourself. Please post any results if you get them.

/Jens

#2

Status:active» closed (fixed)

@ ztyx: Thanks for posting that great info.

@Miraploy: I've got several effects per page, and haven't noticed much in the way of performance problems. But I can't help but think that loading up a page with jquery effects instead of images for all page effects is going to pose performance problems. I made this module mostly as a convenience for including various effects dynamically (in page or block content areas) rather than as a method to replace all image type effects. I'd be curious about your results though.... post back if you have any additional info.