Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Improve frontend performance

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-29-2010, 08:46 PM
 
Ajay Ajay is offline
 

Advanced Member
  
Join Date: Jul 2005
Posts: 50
 

Default Improve frontend performance

I have gone through several threads on the forum which deal with backend or server performance.
However there is plenty of research on the net which show 80% of the perceived performance is related to front end issues.

Have you ever tried firebug (net tab) or yslow and you will understand what I mean. For my sites less that 30% was spent on creating html and remaining 70% on downloading various components. I already have keepalive setting on.

current default themes have so many separate css and javascripts that would cause the page to download slow.

Has anybody tried combining any javascript and css to reduce the external entities?
__________________
Xcart Pro version 4.4.3
Reply With Quote
  #2  
Old 05-29-2010, 08:51 PM
 
Shamun Shamun is offline
 

X-Adept
  
Join Date: Jun 2009
Location: North Carolina
Posts: 841
 

Default Re: Improve frontend performance

Combining the CSS wouldn't be too effective as it is... You'd be better off rewriting the entire sites template from scratch and get the css down to a couple hundred lines rather than nearly 5000.

As for JS, that could be combined effectively. One solution is to remove the standard jQuery include and uses googles CDN. Would make people possibly have it before even visiting your site.

May also want to consider making CSS sprites. That would definitely take out alot of load time, and perhaps even use CSS rounded corners to make buttons.

Another option is to enable GZIP compression if its not already running.



In any case, if you want faster load times, you will in the end need to redo the templates to kill off the massive CSS file.
__________________
- Shane Munroe
Reply With Quote
  #3  
Old 05-30-2010, 11:03 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Improve frontend performance

I have created about 100 skins and I never touch most of the CSS. It's just not used.

You could always write separate style sheets for each section, then call them using an if statement.

I have done this a few times and it works great, just alot of work. Helps speed out tremendously.

Combining java scripts can be a bit more challenging, at least for me.

Limiting the number of background images using sprites can also cut down on HTTP requests.
__________________
xcart 5.1.2
Reply With Quote
  #4  
Old 06-03-2010, 02:53 PM
 
TheWrongGrape TheWrongGrape is offline
 

Advanced Member
  
Join Date: Nov 2002
Location: Los Angeles, CA
Posts: 68
 

Default Re: Improve frontend performance

My new site had been running extremely slowly so I made a big pot of coffee and settled down for some tedious code clean-up.

Instead of creating a skin from scratch, I had modified the existing template which I assume most people do. This left me with a lot of styles I wasn't using and duplicate styles because my theme was linking to main.css and altskin.css. I combined the two and then deleted and combined a lot of styles. I deleted styles for modules I knew I would never use.

Speaking of that, I also eliminated a lot of if-statements from my templates for modules that are always on and completely took out checks for modules I will never use. Did the same by eliminated JS files for modules I don't use and combining as many JS files as I can (be careful though, sometimes leads to conflicts, remember to ALWAYS have a backup to revert to).

Still working on improving site loading time and will be looking at compression and making some of my smaller icons into CSS sprites.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:57 AM.

   

 
X-Cart forums © 2001-2020