You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 43 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Cron jobs can do the trick [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
luchtzak
Support Mod
Support Mod


Joined: Mar 19, 2003
Posts: 308


PostPosted: Sun Aug 01, 2004 5:03 am Reply with quoteBack to top

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!

_________________
Luchtzak Aviation - Snookerforum Belgium
Find all posts by luchtzakView user's profileSend private messageVisit poster's website
steven111
Lieutenant
Lieutenant


Joined: Dec 30, 2003
Posts: 283


PostPosted: Mon Oct 04, 2004 9:22 pm Reply with quoteBack to top

luchtzak wrote:
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.

_________________
ezClassifieds|Forums:Auto,Mac,Job,Win,HW
Find all posts by steven111View user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.354 Seconds - 341 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::