You know the story, everyone has a great PHP-Nuke website and want to make it better to attract more people. So you install cool blocks, special menus etc... But if your website is becoming more popular, it needs more calculations thus server-speed drops. Let me explain a little:
I have a few blocks on the front-page, one is that shows the 10 last forum-topics but underneath the block it also gives an overview of the total amount of topics, messages, views etc... Every time the server needed to calculate a lot of queries.
Now I made a new file and I run a cron job on that file every 15 minutes, so statistics are only update every 15 minutes. The block doesn't need to calculate all those queries but takes just a few figures out of a table in the database.
Resulting in faster page-loads: coming from 4 seconds and higher to 0.3 seconds on certain times!
You know the story, everyone has a great PHP-Nuke website and want to make it better to attract more people. So you install cool blocks, special menus etc... But if your website is becoming more popular, it needs more calculations thus server-speed drops. Let me explain a little:
I have a few blocks on the front-page, one is that shows the 10 last forum-topics but underneath the block it also gives an overview of the total amount of topics, messages, views etc... Every time the server needed to calculate a lot of queries.
Now I made a new file and I run a cron job on that file every 15 minutes, so statistics are only update every 15 minutes. The block doesn't need to calculate all those queries but takes just a few figures out of a table in the database.
Resulting in faster page-loads: coming from 4 seconds and higher to 0.3 seconds on certain times!
That's certainly a great way to get more performance. The other way is to cache the results and update every xx minutes. Can use something like cachelite for that. Same results in this case.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum