Jump to content

Crunching javascript


Guest hennaboy
 Share

Recommended Posts

Guest hennaboy

Ive been working on faster load times for my site and store.

So far ive managed to get between 3.5 and 6% faster load times (using native compression with gzip)

On the way around google I came across this

http://groups.google.com/group/prototype-core/files

Basically its the scriptaculous and prototype files combined and the white space removed etc to compress the files

Apart from keeping the code in a clean way is there any other advantage to keeping all your javascript seperate?

If you dont need to amend the javascript files then would combining them into one compressed file be a problem?

I have 7 js references in my site header....along with the css link your looking at line 112 before you even reach the body html tag

The faster my site works the quicker they get to the payment section :unsure:

Link to comment
Share on other sites

Guest Brivtech

Have you also considered Ioncube PHP Accelerator?

Also, see if you can improve your hosting - I think in your case, from what I remember, you're quite up on this already. I've noticed a massive difference to these forums since Al upgraded recently.

Link to comment
Share on other sites

Guest hennaboy

Hi Brivtech,

Hosting wise ....apart from a few small sites ran by friends I have a whole server to myself so its not that what is the problem. CC4 is running with Ioncube rather than Zend.

What I was finding is tha the admin side of CC4 was slow. Especially the orders section. Could be something to do with the amount of orders in the database. Enabling native iis compression (gzip level 9 - gzip level 10 starts to hog the cpu) made a massive difference. Huge.

The next step would be to cluster two servers and load balance between them so that the mysql backend is on a server of its own. At the rate of growth we have now its possible that will be done in the next 18 months.

Until then im just looking for any little shaving off the loading time both front and backend that will make the site better.

Link to comment
Share on other sites

Guest Brivtech

CC4 is running with Ioncube rather than Zend.

Yes, but I meant the ioncube php accelerator, which I believe is different to the ioncube loader that CC uses to decrypt the licensing encrypted files. Apparently, it can speed up the code by about 5-10%. I haven't tried it myself though.

Link to comment
Share on other sites

With regards to the JavaScript, I would certainly group the files. The fewer HTTP requests, the better. In fact, I would go ahead and group all your JavaScript documents into a single document. It would then be advisable to pack the JavaScript (http://dean.edwards.name/packer/). Packing and gZip'ing your JavaScript in this way should significantly cut loading times.

Please note that packing your JavaScript is pretty much irreversible. Therefore, you should always have source files at hand.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...