Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 5 votes

A Store Speed Optimization in Progress


897 replies to this topic

#881 pdcelec

  • Community Member
  • 606 posts
  • Real Name:Paul Clifford
  • Gender:Male
  • Location:UK

Posted 24 May 2011, 15:37

View Postacidvertigo, on 24 May 2011, 15:32, said:

I'm using USU5 pro, and it works for me.... strange...

I have usu5 pro caching enabled
I will have another go, when I got some more spare time. I use KISSMT as well with caching. As a side note, I have changed all $HTTP_xx_VARS to their $_xx versions throughout my site

#882 acidvertigo

  • Community Member
  • 140 posts
  • Real Name:Luca
  • Gender:Male
  • Location:Roma

Posted 24 May 2011, 16:28

View Postpdcelec, on 24 May 2011, 15:37, said:

I will have another go, when I got some more spare time. I use KISSMT as well with caching. As a side note, I have changed all $HTTP_xx_VARS to their $_xx versions throughout my site


the same also for me and it works.

Please send a thumbnail or error code. I cannot reproduce this.

#883 pdcelec

  • Community Member
  • 606 posts
  • Real Name:Paul Clifford
  • Gender:Male
  • Location:UK

Posted 24 May 2011, 16:41

View Postacidvertigo, on 24 May 2011, 16:28, said:

the same also for me and it works.

Please send a thumbnail or error code. I cannot reproduce this.
I have done the alterations to product_info.php. When completing the alteration to the top of the file everything is ok. The error occurs when I complete the alteration above require DIR_WS_INCLUDES . 'template_bottom.php';

This is the error that occurs
The web page at http://www.electricalcity.co.uk/mcbs-federal-electric-hca-c32-hca3p32-32a-mcb-p-826.html might be temporarily down or it may have moved permanently to a new web address.
Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error.

Edit: It is producing a cache file in the tree directory

Edited by pdcelec, 24 May 2011, 16:46.


#884 acidvertigo

  • Community Member
  • 140 posts
  • Real Name:Luca
  • Gender:Male
  • Location:Roma

Posted 25 May 2011, 07:12

View Postpdcelec, on 24 May 2011, 16:41, said:

I have done the alterations to product_info.php. When completing the alteration to the top of the file everything is ok. The error occurs when I complete the alteration above require DIR_WS_INCLUDES . 'template_bottom.php';

This is the error that occurs
The web page at http://www.electricalcity.co.uk/mcbs-federal-electric-hca-c32-hca3p32-32a-mcb-p-826.html might be temporarily down or it may have moved permanently to a new web address.
Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error.

Edit: It is producing a cache file in the tree directory


Are you using Chrome browser?

http://www.google.com/support/forum/p/Chrome/thread?tid=3388bd392b939f43&hl=en

#885 pdcelec

  • Community Member
  • 606 posts
  • Real Name:Paul Clifford
  • Gender:Male
  • Location:UK

Posted 25 May 2011, 07:35

View Postacidvertigo, on 25 May 2011, 07:12, said:


Yes, I am using Chrome

#886 acidvertigo

  • Community Member
  • 140 posts
  • Real Name:Luca
  • Gender:Male
  • Location:Roma

Posted 25 May 2011, 09:29

View Postpdcelec, on 25 May 2011, 07:35, said:

Yes, I am using Chrome

Maybe updating it can resolve the issue. Also if your using gzip option inside oscommerce instead of gzip pages with .htaccess file can generate the problem on some environments.

#887 acidvertigo

  • Community Member
  • 140 posts
  • Real Name:Luca
  • Gender:Male
  • Location:Roma

Posted 25 May 2011, 09:30

On my github network page there are my changes to the oscommerce code.

I'm tryng to remove the deprecated $HTTP_XXX_VARS code and applyng some php tricks to increase performance.

You can follow changes here https://github.com/acidvertigo/oscommerce2/network

#888 pdcelec

  • Community Member
  • 606 posts
  • Real Name:Paul Clifford
  • Gender:Male
  • Location:UK

Posted 26 May 2011, 16:58

View Postacidvertigo, on 25 May 2011, 09:29, said:

Maybe updating it can resolve the issue. Also if your using gzip option inside oscommerce instead of gzip pages with .htaccess file can generate the problem on some environments.

Turning off the gzip compression in osCommerce solves the problem

#889 acidvertigo

  • Community Member
  • 140 posts
  • Real Name:Luca
  • Gender:Male
  • Location:Roma

Posted 14 August 2011, 15:35

Hello i've posted to github some php microimprovement to gain a little more speed you can check it on my github repository: https://github.com/acidvertigo/oscommerce2/commits/master

#890 Gergely

  • Community Member
  • 343 posts
  • Real Name:Tóth Gergely
  • Gender:Male

Posted 16 August 2011, 09:46

View Postacidvertigo, on 14 August 2011, 15:35, said:

Hello i've posted to github some php microimprovement to gain a little more speed you can check it on my github repository: https://github.com/a.../commits/master

Hi acidvertigo!


Great Work!


The $_GET supergobals not need to decode in some place, so much be faster. (IE in header.php)

From PHP manual:

Quote

Note:

The GET variables are passed through urldecode().


Regards,
Gergely

Edited by Gergely, 16 August 2011, 09:48.

Header Footer Content Modules
SCM
V3

and some rewrites :-)

#891 acidvertigo

  • Community Member
  • 140 posts
  • Real Name:Luca
  • Gender:Male
  • Location:Roma

Posted 16 August 2011, 10:28

View PostGergely, on 16 August 2011, 09:46, said:


The $_GET supergobals not need to decode in some place, so much be faster. (IE in header.php)

From PHP manual:



Thank you for the tip! :lol:

#892 acidvertigo

  • Community Member
  • 140 posts
  • Real Name:Luca
  • Gender:Male
  • Location:Roma

Posted 16 August 2011, 15:36

I tried other little changes on functions/general.php and functions/html_output.php changing the function tep_not_null in isset. Seems a little bit faster but i don't know if isset return the same bool results of the tep_not_null functions. Anyone can help?

#893 Gergely

  • Community Member
  • 343 posts
  • Real Name:Tóth Gergely
  • Gender:Male

Posted 17 August 2011, 07:49

Hi,

Has somebody any experriencies in gzip? I think all web browsers support HTTP gzip at 2011.


I can reach Page Speed Score from 62/100 to 91/100 with some features.
css and js files gzip downloads



I add *.css and *.js files to *.css.php and *.js.php and rewrite template_top.php csss and js links

insert the top of the new php files
for *css.php
<?php
ob_start ("ob_gzhandler");
header("Content-type: text/css; charset: UTF-8");
header("Cache-Control: must-revalidate");
$offset = 60 * 60 * 24 * 7;
$ExpStr = "Expires: " .
gmdate("D, d M Y H:i:s",
time() + $offset) . " GMT";
header($ExpStr);
?>

for *css.php
<?php
ob_start ("ob_gzhandler");
header("Content-type: text/css; charset: UTF-8");
header("Cache-Control: must-revalidate");
$offset = 60 * 60 * 24 * 7;
$ExpStr = "Expires: " .
gmdate("D, d M Y H:i:s",
time() + $offset) . " GMT";
header($ExpStr);
?>

My main files for v2.3.1:

Quote


Perhaps this new files can be gziped static and after include them before the last ?> close tag. In this case not need ob_start. I think this feature can do in a new contribution.

Edited by Gergely, 17 August 2011, 07:50.

Header Footer Content Modules
SCM
V3

and some rewrites :-)

#894 acidvertigo

  • Community Member
  • 140 posts
  • Real Name:Luca
  • Gender:Male
  • Location:Roma

Posted 17 August 2011, 12:44

You can do this putting this code in .htaccess file of your root directory:


# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript


#895 acidvertigo

  • Community Member
  • 140 posts
  • Real Name:Luca
  • Gender:Male
  • Location:Roma

Posted 03 September 2011, 23:05

Oppss correct code is:

SetOutputFilter DEFLATE

# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript


#896 Parikesit

  • Community Member
  • 263 posts
  • Real Name:zaenal
  • Gender:Male
  • Location:Bandung, Indonesia

Posted 01 October 2011, 05:04

A very long thread. I wish someone can make a resume :D

#897 Yak39

  • Community Member
  • 73 posts
  • Real Name:Francesco Rossi

Posted 21 October 2011, 08:51

Hello all, I am feeling sorry to bloat even more this topic with my request.
I went thru some of the mods suggested here, from category enhancements to the various tep_get queries.
I also tweaked the .htaccess file adding deflating and duration timings.

Fact is that I am still getting no clue on where my OSC is running slow. The firs load of the catalog takes 23 secs! Specifically the queries that look like are getting things slow are again the categories query and the header_tags query.

I run a quite heavily modified shop including STS (disabling didn't give any performance improvement).
Can someone please help me understand where the problem lies?

www.schermaontc.com/ecom

thank you.
Francesco

Edited by Jan Zonjee, 21 October 2011, 20:54.


#898 acidvertigo

  • Community Member
  • 140 posts
  • Real Name:Luca
  • Gender:Male
  • Location:Roma

Posted 22 October 2011, 12:44

Seems something wrong with your hosting company and not with the script

You can check here the speed of your site: http://tools.pingdom.com/?url=www.schermaontc.com/ecom&treeview=0&column=objectID&order=1&type=0&save=true

The first time response is very long, then the site loads faster.

Check your apache configuration