Guest Posted May 17, 2003 Posted May 17, 2003 We have added a huge amout of products nearlly 3,000 products and the site is gone very slow and we are only new to php and we need some help trying to speed the shop up for its load time.
Ajeh Posted May 17, 2003 Posted May 17, 2003 Do you have a URL we can peek at to find out why you are slow? :D
Emmtee Posted May 17, 2003 Posted May 17, 2003 suggestion from other thread: turn off categories count :) http://www.oscommerce.com/community/contributions,1762
Emmtee Posted May 17, 2003 Posted May 17, 2003 Do you have a URL we can peek at to find out why you are slow? :D looking at his former posts: Forum: General Support Verfasst am: Mi Apr 30, 2003 1:56 pm Titel: website addy www.advancedcomputersau.com/shop/catalog http://www.oscommerce.com/community/contributions,1762
Guest Posted May 17, 2003 Posted May 17, 2003 I tried it and it's really slow. What I would do is this: put some echo commands in the code where you print out timestamps. Do this especially before and after the SQL-Queries. This will help you to find out, if an SQL Statement may be the culprit. Marian
dvdvideo Posted May 18, 2003 Posted May 18, 2003 Hi , I have about 5000+ items on my oscom site and have been having the same problem of very slow queries.... I really hope some one has a fix. My site is located at http://www.dvdvideo.co.nz/oscom/catalog/ca...log/default.php Sometimes a page loads quick other times can be up to 60 secs I have added the parse time to the site to see what time its taking . I am Looking forward to any improement... I nearly considered taking oscom off the site it was so slow , but I see other sites not slow and can only wonder why :?
Emmtee Posted May 18, 2003 Posted May 18, 2003 Hi , I have about 5000+ items on my oscom site and have been having the same problem of very slow queries.... I really hope some one has a fix. My site is located at http://www.dvdvideo.co.nz/oscom/catalog/ca...log/default.php Sometimes a page loads quick other times can be up to 60 secs I have added the parse time to the site to see what time its taking . I am Looking forward to any improement... I nearly considered taking oscom off the site it was so slow , but I see other sites not slow and can only wonder why :? you need to use images with correct size, ... loading your page took 300kb data for the storefront - your images are not split into big and preview - so the browser loads the big one and the scales it down to a tiny thumbnail-image... http://www.oscommerce.com/community/contributions,1762
Emmtee Posted May 18, 2003 Posted May 18, 2003 ps: try to enable gzip compression if you didn't do that already :) http://www.oscommerce.com/community/contributions,1762
dvdvideo Posted May 18, 2003 Posted May 18, 2003 So how do I do that ..? How do you have thumb images on the preview and the big one in the product page I think its more than just image size because when i turn images off its still very slow I appreciate the reply :)
Emmtee Posted May 18, 2003 Posted May 18, 2003 simple trick: save your site with a browser including images, then examine filesizes... IMHO parsetime is no issue - just 300k are way too much to load - especially for a 56k user this would be horrible (yes,they exist) 56k users can download with approximately 6-7 kbytes / sec... so loading your page would take about 46 seconds.... there are claims that people lose interest after 20 seconds for default.php your site submits 40k html text - 6 seconds to load... i suppose you see why gzip is important (as much as a good server with reasonable compression and no packetloss) about the images: currently you have to do quite some amount of coding and work to establish it. coding the image-resizing functions for my shop was based on image_resize contrib, but it was buggy and did not match my needs - so it took me 2-3 days of work to get it just how i liked it... automatic. hint: when running on linux use imagemagick "convert" or the other related tools to create small preview images (this allows me to upload even 2000x1600 sized images to admin and they get auto-shrinked to preview and to "big" size.. just too many changes to describe here in detail http://www.oscommerce.com/community/contributions,1762
Emmtee Posted May 18, 2003 Posted May 18, 2003 PS: go to admin and turn OFF category counts then go to admin and enable gzip compression those 2 steps should help reduce computing time a lot (current test stated 5.6 seconds) try to find a situation where loading is unacceptably slow - as soon as you can reproduce it, then you can hunt it down :) http://www.oscommerce.com/community/contributions,1762
Emmtee Posted May 18, 2003 Posted May 18, 2003 PS: go to admin and turn OFF category counts then go to admin and enable gzip compression those 2 steps should help reduce computing time a lot (current test stated 5.6 seconds) try to find a situation where loading is unacceptably slow - as soon as you can reproduce it, then you can hunt it down :) found one myself.... http://www.dvdvideo.co.nz/oscom/catalog/ca....php/cPath/2_76 Parse Time: 61.457s try turning off category counts and check that url for speed then http://www.oscommerce.com/community/contributions,1762
Ajeh Posted May 18, 2003 Posted May 18, 2003 My site is located athttp://www.dvdvideo.co.nz/oscom/catalog/ca...log/default.php I am Looking forward to any improement... I nearly considered taking oscom off the site it was so slow , but I see other sites not slow and can only wonder why :? You also need to turn off your category counts. This is located in the Admin ... Configuration ... My Store ... Show Category Counts If you have an older version you will find a setting in the /includes/applications_top.php define('SHOW_COUNTS', 'true'); // show category count: true=Yes False=No
dvdvideo Posted May 18, 2003 Posted May 18, 2003 1. where do you enable gzip compression ? 2. how do you turn off categories count ? 3. The mod suggested image_resize contrib... if i use that are you (Emmtee) able to update the contrib to make it work and submit it as an update? I turned off the images on the site now and its still slow, so am looking forward to how to do the 1 & 2 above to see if it works and or if I have gzip already enabled.
Emmtee Posted May 18, 2003 Posted May 18, 2003 read above :) http://www.oscommerce.com/community/contributions,1762
dvdvideo Posted May 18, 2003 Posted May 18, 2003 ok i have edited the application_top.php and turned the cat count off .. I am using 12/9/2002 snap shot so didnt appear in admin I cant see the gzip option in admin ... where is that please
Emmtee Posted May 18, 2003 Posted May 18, 2003 ok i have edited the application_top.php and turned the cat count off .. I am using 12/9/2002 snap shot so didnt appear in admin I cant see the gzip option in admin ... where is that please Parse Time: 2.780s ... MUCH better :) the config-key is called "GZIP_COMPRESSION" and is stored in table "configuration" (mySQL) ... MS1 based shop... available in admin... probably you'll have to dig for it inside of your .php files or even @ php.ini http://www.oscommerce.com/community/contributions,1762
dvdvideo Posted May 18, 2003 Posted May 18, 2003 OK have searched through all phps and config table for gzip The only place its mentioned is in the backup.php file and there is no mention in the sql configuration table when looking at it with myadmin Is there a line I can add into what ever the correct php file to do this please? It has speed up turning the cat numbers off though ... thanks so far :)
dvdvideo Posted May 18, 2003 Posted May 18, 2003 Hi Lynda, Its a pleasure to have you helping me out ... I use some of your contributions as you will have noticed. From what I can see on other posts your a wonderful person and a tremendous help for the newbies like me . Thanks Lynda :D Thanks Emmtee :D Still like to sort this gzip out though, and of course get a picture mod working
Ajeh Posted May 18, 2003 Posted May 18, 2003 I got the basic idea of it ... :D The gzip is in the newer snapshots. Have you considered upgrading to a current snapshot and just read your changes to your site?
Emmtee Posted May 18, 2003 Posted May 18, 2003 hint: php.ini features AFAIK generic gzip support here my defaults for where it's DISABLED: /etc # grep -iC10 compres php.ini ; You can redirect all of the output of your scripts to a function. For ; example, if you set output_handler to "mb_output_handler", character ; encoding will be transparently converted to the specified encoding. ; Setting any output handler automatically turns on output buffering. ; Note: People who wrote portable scripts should not depend on this ini ; directive. Instead, explicitly set the output handler using ob_start(). ; Using this ini directive may cause problems unless you know what script ; is doing. ; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler" ; and you cannot use both "ob_gzhandler" and "zlib.output_compression". ;output_handler = ; Transparent output compression using the zlib library ; Valid values for this option are 'off', 'on', or a specific buffer size ; to be used for compression (default is 4KB) ; Note: Resulting chunk size may vary due to nature of compression. PHP ; outputs chunks that are few hundreds bytes each as a result of ; compression. If you prefer a larger chunk size for better ; performance, enable output_buffering in addition. ; Note: You need to use zlib.output_handler instead of the standard ; output_handler, or otherwise the output will be corrupted. zlib.output_compression = Off ; You cannot specify additional output handlers if zlib.output_compression ; is activated here. This setting does the same as output_handler but in ; a different order. ;zlib.output_handler = ; Implicit flush tells PHP to tell the output layer to flush itself ; automatically after every output block. This is equivalent to calling the ; PHP function flush() after each and every call to print() or echo() and each ; and every HTML block. Turning this option on has serious performance ; implications and is generally recommended for debugging purposes only. implicit_flush = Off but better google or check out the gzip activation code in new snapshots and backport them to your sys - i suppose that will work smoother than tweaking general php output functions :) http://www.oscommerce.com/community/contributions,1762
dvdvideo Posted May 18, 2003 Posted May 18, 2003 I would love to upgrade the snap shot but I have been completely paranoid about it not to mention unsure of how to. If I can use all my current info and features I will do it in a snap. Can you upgrade the core without stuffing it? I must admit I havent got a clue how to do the upgrade :cry: On the create account page we have added in a fuction that gets the suburb and parses the post code into the postcode box so people who dont know their code dont have to worry about it. But I guess that could be put back in I would appreciate you giving some info on how to do the upgrade if you have time :wink:
Ajeh Posted May 18, 2003 Posted May 18, 2003 It depends on your changes. If you just have a few add-ons, start with the current snapshot and re-install the add-ons ... providing they are made for MS1 or newer snapshots. If you have your own code changes, use Beyond Compare to check your files against the new files are there are many syntax changes to various functions and code standards for things like array names. I would make a seperate MySQL file and load the current snapshots oscommerce.sql into it. Do a empty on the tables for the products. I think Jim is posting a handy Tips and Tricks on which files actually contain your data for your products so you do not leave one out. On your backup of those tables, make sure you do a data save with complete inserts. If you get errors on loading your backup, compare the tables for any changes. Depending on the date of your current snapshot, it may just be the orders tables that are really changed and if your site is not yet live, you will not lose anything besides those. Main thing is to backup all of your files to a seperate directory that you can refer to. Load the current snapshot into a new directory on your site, and make sure all is working with the sample data before you start to make changesw. ie. Do all your configuration changes with the sample data in place to test things like emails, orders, etc. Then, start putting things together. Sound like a fun time? :shock:
Recommended Posts
Archived
This topic is now archived and is closed to further replies.