Chronjob & rss aggregator performance?

Creating and modifying plugins.
Post Reply
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Chronjob & rss aggregator performance?

Post by Don Chambers »

Just curious... is there any performance difference between the available execution times (5 min, 30, hourly, etc)? Any reason someone would NOT want to aggregate entries as soon as possible after they were created?

The context of my question is aggregating content from one s9y site to another s9y site.
=Don=
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Yes, there's a performance difference.

If your hosting service supports cron, their server has to run the wget (or whatever you're using) program at each time interval. If you set it to every 1 second, they'd get pretty upset. Depending on how much data is being processed, even every 1 minute might cause problems.

If you're using the cronjob plugin (and I believe your title said you were, but I can't read it from the reply page!), then s9y checks whether the configured time has expired whenever a page is fetched. The check is a minor little thing, and occurs whether the time has expired or not.

But if the check indicates that time has expired, serendipity has to go connect to the RSS feed and try to download any updated entries. The unlucky user who clicked after the expiration period has to wait for the connection (and possibly the download) to complete before he sees his page (I think; it's possible we actually wrote *threaded* code or something advanced. That would be neat).

When websites are down, it can take 60 seconds before the connection gives up.

When websites are up, the download time will depend on how much data needs to be transferred and processed.

So, if you're using the cronjob plugin, and you set the cron expiration time to a short interval, more of your users will need to wait for the connection and possible download; the longer you make it, the fewer users who have to wait.

If you're using a hosting service's provided cron, and you set the cron time to a short interval, you may become the reason they don't offer cron services any more. :lol:
Judebert
---
Website | Wishlist | PayPal
Post Reply