Jump to content
Sign in to follow this  
basilfawlty

Faster Page Loads

Recommended Posts

Hi I tried to install this script but I got the following error?

 

Any ideas?

 

 

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'MAX_RANDOM_SELECT_NEW' at line 1

 

select products_id, products_image, products_tax_class_id, products_price from products where products_status = '1' order by products_date_added desc limit MAX_RANDOM_SELECT_NEW

 

Thank You

 

Arthur

Share this post


Link to post
Share on other sites

HI

First of all i would like to thank all the people invovled in this contribution.

 

I have installed it without any difficulties and it seems to have made just a small improvement.. As i am still having a bit of trouble with my categories page in my admin section as that is my main concern.. I have approximately 5000 products.. but i am calling about many be 150-200 products in a sub category.

 

any more ideas as to speed that secion up..

 

many thanks once again.

Share this post


Link to post
Share on other sites

akkinmore

You probably do not want to put the file under the htdocs folder as that is usually the document root of your web (i.e. where the files are served from). You will want to keep the file our of the document root to keep it accessible only to the system.

 

A better path would be

"/Program Files/Apache Group/Apache2/htdocs /config_cache_gift/configuration_cache.php"

 

although I do not know how Apache will handle the space in "program files" and "apache group".

 

The filename "configuration_cache.php" can be anything that you want it to be. Just be sure to use the same path and filename in both of the includes/configuration_cache_read.php files. ;)

 

mybaby

That has nothing to do with this contribution. Try checking to verify that in Admin ~ Configuration ~ Maximumus that there is a setting for New Products. Otherwise post a thread in the General Support forums.

 

Genius

That also does not involve this contribution and should be posted in the General support forums.

 

Some suggestions are -

Turn off category counts (Admin ~ Configuration ~ My Store) and enable GZip compression (Admin ~ Configuration ~ GZip compression) with a setting of 1.

 

You might want to consider editing the select statement to contain a limit clause so as to not pull all of the categories when you only need a few.

 

Add an index to the categories_description table for the categories_name.

 

If you have mysql 4.x, enable query caching.

 

That should be a good start for you. ;)


"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Share this post


Link to post
Share on other sites

hi Daemonj

 

thanks for your suggestion..

 

I have already have most of what you have suggested besides these two which i am not too sure to go about.

1.

You might want to consider editing the select statement to contain a limit clause so as to not pull all of the categories when you only need a few.

 

I am not too good with my php programming.. and just wondering how i can edit the select statement to limit the categories..

 

2.

If you have mysql 4.x, enable query caching

 

I have MySQL 4.0.17 and i am running phpMYAdmin 2.5.3

 

I do not know how to enable query caching.. please could you advise me on this.

 

many thanks

Share this post


Link to post
Share on other sites
hi Daemonj

 

thanks for your suggestion..

 

I have already have most of what you have suggested besides these two which i am not too sure to go about.

1.

You might want to consider editing the select statement to contain a limit clause so as to not pull all of the categories when you only need a few.

 

I am not too good with my php programming.. and just wondering how i can edit the select statement to limit the categories..

It is a matter of finding the query that is pulling the categories in the page(s) in question and at the end adding 'limit xxx' where xxx is the total number of records you wish to grab. For example, to get 30 records you would add 'limit 30', without the quotes of course.

 

2.
If you have mysql 4.x, enable query caching

 

I have MySQL 4.0.17 and i am running phpMYAdmin 2.5.3

 

I do not know how to enable query caching.. please could you advise me on this.

 

many thanks

Check out this thread for more information.


"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Share this post


Link to post
Share on other sites

Hi Jim, i think that there's a bug in your contrib.

 

But i don't know if this happen only to me..

 

When i try to update a configuration option in the Modules section, i had to update the configuration two times, cause if i update only one the value stills the same.

 

Let's say i try to update the sort order of the table shipping to 5, and stills in 0, then i try to update to 5 again and now it works.

 

This happen to you too?

Share this post


Link to post
Share on other sites
Hi I tried to install this script but I got the following error?

 

Any ideas?

 

 

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'MAX_RANDOM_SELECT_NEW' at line 1

 

select products_id, products_image, products_tax_class_id, products_price from products where products_status = '1' order by products_date_added desc limit MAX_RANDOM_SELECT_NEW

 

Thank You

 

Arthur

I got this same problem when i install this contr.

 

i don't know why this happened, what is wrong with the new products?

Share this post


Link to post
Share on other sites

here are the parse time results for multiple tests of this contribution:

 

round 1 cache no cache

 

0.092 0.091

0.099 0.099

0.093 0.079

0.153 0.086

0.1 0.168

0.656 0.282

0.154 0.091

0.083 0.079

0.098 0.112

0.372 0.154

Average 0.19 0.1241

 

round 2 cache no cache

0.455 0.4000

0.136 0.0800

0.125 0.2220

0.109 0.1460

0.079 0.2150

0.084 0.1060

0.185 0.1910

0.234 0.2030

0.138 0.0790

0.110 0.1080

Average 0.1655 0.1750

 

Any ideas why the contribution is not speeding up the parse times? I am running a heavily modified store and have enabled compression for this contribution.

Share this post


Link to post
Share on other sites

edtiger,

 

The first thing I would do is verify that the cache file is being used or if it is being skipped over.

 

An easy way to do this would be to edit the cache file and add a define for a variable e.g.

define('DEBUG', 'in the cache file');

 

Then in the includes/application_bottom.php file just before the end ?> insert a line like

echo DEBUG;

 

If the cache file is indeed being processed then at the bottom of a catalog page should be the statement "in the cache file".

 

If you do not see that message then the cache file is not being processed and you have some detective work ahead of you. :)


"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Share this post


Link to post
Share on other sites

Thanks for the quick reply. yes it is functioning properly but I don't see much in the way of speed improvements. I only have compression set to '1'. Any other thoughts?

Share this post


Link to post
Share on other sites

Set compression to False and see if that helps any.

 

You already have excellent parse times even without caching. What kind of server are you running and how many users did it have at the time of testing?


"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Share this post


Link to post
Share on other sites

SERVER: shared server through pair.com.

USERS: it's a test site so no users besides the test ones...

 

cache, no compression cache, compression no cache page

0.687 0.143 0.485 index.php

0.087 0.071 0.073 login.php

0.34 0.113 0.247 account.php

1.786 1.536 1.618 shopping_cart.php

1.608 1.427 1.649 checkout_shipping.php

0.205 0.207 0.207 checkout_payment.php

0.237 0.164 0.179 checkout_confirmation.php

0.098 0.1 0.087 index.php

0.082 0.093 0.084 index.php

0.101 0.095 0.082 index.php

0.084 0.083 0.088 index.php

0.089 0.085 0.084 index.php

0.102 0.083 0.084 index.php

0.423538462 0.323076923 0.382076923 AVERAGE

 

Overall, cache with compression is the best with no page caching coming in a close second. I suspect as user load increases, caching will have a greater impact.

Share this post


Link to post
Share on other sites

You are correct as the cache file saves a query to the database, which has more of an impact as the number of users is increased.

 

You still have some good numbers, even without caching. For example, my load time without caching for the index page was 1.486. Adding caching with a compression of 1 dropped the parse time down to 0.76 (basically half) with a very light load on the server.

 

I have never gotten a chance to try it when the server was full tilt.


"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Share this post


Link to post
Share on other sites

A new version (1.31) has been uploaded to correct some minor deficiencies.

 

If you already have this contribution installed, simply replace the admin\includes\configuration_cache.php file.


"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Share this post


Link to post
Share on other sites

Hi

 

Great contrib, just one note, the define should be in single quotes or it will produce 200+ PHP warnings.

 

define('CONFIGVAR', '0');

Share this post


Link to post
Share on other sites

hi,

 

installed latest version everything works o.k but when viewing the site i'm getting:

 

Warning: Cannot modify header information - headers already sent by (output started at /var/www/xxx.xxx.com/includes/configuration_cache_read.php:33) in /var/www/xxx.xxx.com/includes/functions/general.php on line 1198

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /var/www/xxx.xxx.com/includes/configuration_cache_read.php:33) in /var/www/xxx.xxx.com/includes/functions/sessions.php on line 67

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/xxx.xxx.com/includes/configuration_cache_read.php:33) in /var/www/xxx.xxx.com/includes/functions/sessions.php on line 67

 

anyone with any ideas on how to fix this??

 

thanks

Edited by meds

Share this post


Link to post
Share on other sites

There should not be a line 33 in the catalog/includes/configuration_cache_read.php file.

 

Edit the file to remove any newlines at the end of the file or reupload the file and ensure that you are in ASCII mode.


"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Share this post


Link to post
Share on other sites

Help please.

 

I just installed this mod, and I get this error when trying to update my store configuration:

 

Warning: fwrite(): supplied argument is not a valid stream resource in /usr/local/apache/www/virtual/xxxx/xxxx/htdocs/admin/includes/configuration_cache.php on line 39

 

Warning: fclose(): supplied argument is not a valid stream resource in /usr/local/apache/www/virtual/exxxx/xxxxx/htdocs/admin/includes/configuration_cache.php on line 40

 

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache/www/virtual/xxxxxx/xxxx/htdocs/admin/includes/configuration_cache.php:39) in /usr/local/apache/www/virtual/xxxxxx/xxxx/htdocs/admin/includes/functions/general.php on line 18

 

this is what i have on line 39 and 40

 

39 $fout = fwrite($fp , $config_cache_output);

40 fclose($fp);

 

I can't figure out how to fix this error.

Edited by peego

Share this post


Link to post
Share on other sites

The script is not able to write to the output file.

 

Verify that the folder that you specified for the cache file's location has 777 permissions.


"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Share this post


Link to post
Share on other sites

thanks for the quick reply! I got it working now. it messed up configuring the files hehe... :)

 

For some reason the loading times of most of the pages on my site still seem quite slow to me... taking anywhere from 2 to 10 seconds to load. (my guess).

 

I just dunno why its taking so long to load... i realize some of the pages have quite a few images, but all the images are around 4 to 5k in size... even for the single product pages with just 1 image, sometime it takes a few seconds to load. :blink:

 

here's my site: http://www.canada-sports-supplement.com/ is it slow for others? please suggest on how I can improve its speed.

 

thank you.

Edited by peego

Share this post


Link to post
Share on other sites

peego, that should be posted in the general support forum

 

Following are a few suggestions:

- do you have GZip compression enabled and set to 1?

 

- have you added any indexes to your database? Search in the Tips & Tricks forum by my name for index and you will find the appropriate article.

 

- if you are running mysql 4 on your server have you enabled query caching? Search in the Tips & Tricks forum by my name for query and you will find the appropriate article.

 

- have you performed a load test on your pages to see what their overall size is?


"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Share this post


Link to post
Share on other sites

How does this contribution make the website load faster?

 

Is it jsut caching? Or other aspects as well ... such as causing text to lead before images?

 

Thanks

Share this post


Link to post
Share on other sites

Instead of querying the database for the configuration parameters for every page request by every user, it reads a file containing those parameters.


"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Share this post


Link to post
Share on other sites

Superb! Have installed this contrib and the parse times on admin have improved on a huge scale.

 

Question - Is this contrib supposed to work on the catalog side of the system as I have noticed no difference on this side.

 

Keep up the good work

 

Regards

 

Andy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×