| Author |
Message |
ultramagna
Nuke Soldier


Joined: May 06, 2003
Posts: 22
|
Posted:
Tue Jul 15, 2003 2:39 pm |
  |
Hi,
I've recently implemented about 5 rdf center blocks and about 5 rdf right blocks. Since then, my site is about 5 times slower! Does this technology (xml) really cause this slowdown if use to many links?
As soon as I deactivated them. the site was back and smooth as normal.
Anyone??? |
|
|
   |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Tue Jul 15, 2003 4:57 pm |
  |
Sure, you are most likely pulling from other sites right? |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
lamjam
Nuke Soldier


Joined: Jul 07, 2003
Posts: 32
Location: Chicago
|
Posted:
Tue Jul 15, 2003 8:43 pm |
  |
Yes, I did the same thing. I had two rss/rdf blocks pulling from other sites (thats what it is for, right?) and my site was like at a standstill!
When I deleted the blocks, boom, back to normal.
Anyone have a way around that? |
_________________ Lam Jam
------------------
Positive attitude combined with a comfortable chair, and lots of coffee - then anything is possible! |
|
    |
 |
MikeMiles
Lieutenant


Joined: May 29, 2003
Posts: 231
|
Posted:
Tue Jul 15, 2003 9:53 pm |
  |
The work around is to rewrite the code so it creates cache files on your server and then run a cron job to update these periodically. I don't use RSS feeds, but do pull a datafeed from another site. If my cron cannot retrieve fresh data then my main site will not display the info until the next scheduled update refresh which is I set at every 30 minutes.
If you are unable to use cron, you can write the code to trigger cache updates on page accesses instead. The problem with this though is the person who triggers a page update will experience some delay especially if your updating multiple feeds at once, but it will go back to regular speed when the cache is used again. If you are able to use a cron there won't be any reduced speed. |
|
|
   |
 |
lamjam
Nuke Soldier


Joined: Jul 07, 2003
Posts: 32
Location: Chicago
|
Posted:
Wed Jul 16, 2003 5:48 am |
  |
I'll check it out. I have no idea what a cron is, though.
Sounds like a bad guy from the power rangers or something. (I have kids)
I'll research it and see what happens. Thanks |
_________________ Lam Jam
------------------
Positive attitude combined with a comfortable chair, and lots of coffee - then anything is possible! |
|
    |
 |
MikeMiles
Lieutenant


Joined: May 29, 2003
Posts: 231
|
Posted:
Wed Jul 16, 2003 2:18 pm |
  |
| lamjam wrote: |
I'll check it out. I have no idea what a cron is, though.
|
A cron job is just a command which runs from the shell window and executes system calls and/or scripts either on a one time basis or more commonly at some recurring time interval. For example, you can set up a cron job to execute the mysqldump utility to automatically back up your database every other day at 2 am. You can set another one to call one of your scripts to email all your users new articles four times a day. Or in this case, set one up to refresh the cache data sitting on your own server from different RSS feeds from other sites. |
|
|
   |
 |
lamjam
Nuke Soldier


Joined: Jul 07, 2003
Posts: 32
Location: Chicago
|
Posted:
Wed Jul 16, 2003 10:27 pm |
  |
Can this be done even if I am remotely hosted, or is this something that has to be done at the server? |
_________________ Lam Jam
------------------
Positive attitude combined with a comfortable chair, and lots of coffee - then anything is possible! |
|
    |
 |
MikeMiles
Lieutenant


Joined: May 29, 2003
Posts: 231
|
Posted:
Thu Jul 17, 2003 7:10 am |
  |
It's done at the server level, but many hosts even budget ones allow their customers to submit cron jobs. You have to ask yours whether they allow this or not. I have a couple sites on shared servers too, and mine allows it. |
|
|
   |
 |
lamjam
Nuke Soldier


Joined: Jul 07, 2003
Posts: 32
Location: Chicago
|
Posted:
Thu Jul 17, 2003 9:00 am |
  |
| Quote: |
| The work around is to rewrite the code so it creates cache files on your server and then run a cron job to update these periodically. I don't use RSS feeds, but do pull a datafeed from another site. If my cron cannot retrieve fresh data then my main site will not display the info until the next scheduled update refresh which is I set at every 30 minutes. |
Would you happen to have sample code, or know of a script (cron job) that I can use?
I just need to have a couple of automatically updated news feeds on my site. So I'd like to try it out, but I do not know how to write a cron job code.
TY  |
_________________ Lam Jam
------------------
Positive attitude combined with a comfortable chair, and lots of coffee - then anything is possible! |
|
    |
 |
Jenses
Private


Joined: Jun 09, 2003
Posts: 45
Location: Denmark
|
Posted:
Mon Aug 04, 2003 1:42 am |
  |
The cause is a bug in mainfile.php
look for
| Code: |
| otime = $row[otime]; |
and change it to
| Code: |
| otime = $row[time]; |
the bug causes the block to be refreshed every single time a page i created.... |
|
|
    |
 |
VinDSL
Site Admin


Joined: Jul 08, 2003
Posts: 1193
Location: Arizona (USA) Site Admin: Lenon.com Admin: Disipal Designs
|
Posted:
Mon Aug 04, 2003 2:54 am |
  |
| Jenses wrote: |
The cause is a bug in mainfile.php
look for
| Code: |
| otime = $row[otime]; |
and change it to
| Code: |
| otime = $row[time]; |
the bug causes the block to be refreshed every single time a page i created.... |
You gotta love this guy... nice catch! How did you figure that one out?  |
|
|
     |
 |
VinDSL
Site Admin


Joined: Jul 08, 2003
Posts: 1193
Location: Arizona (USA) Site Admin: Lenon.com Admin: Disipal Designs
|
Posted:
Mon Aug 04, 2003 2:58 am |
  |
Heh! Nevermind!
http://www.nukecops.com/postp28856.html
Good catch anyway. I would have never known about it if you hadn't said something...
OMG!!! Can you image the hits NC is taking with everybody pulling feeds everytime a page is refreshed on their sites. ZX could probably cut his bandwidth useage in half if everyone knew about this. This should be a sticky on the main page for a while!!!  |
|
|
     |
 |
Rikaelus
Nuke Cadet


Joined: Mar 24, 2003
Posts: 6
|
Posted:
Fri Aug 08, 2003 3:25 pm |
  |
| Jenses wrote: |
The cause is a bug in mainfile.php
look for
| Code: |
| otime = $row[otime]; |
and change it to
| Code: |
| otime = $row[time]; |
the bug causes the block to be refreshed every single time a page i created.... |
Doh. You beat me to it.
I was pulling my hair out for quite a while until I looked in the code and found that bug. I about threw a party when it was fixed and my site was back up to normal speed. |
|
|
   |
 |
|
|