in reply to Perl scripts making my site slow

You could set up a cron job that ran each script and directed it's output to the appropriate file. You would probably want to lock the files first, to prevent someone from a requesting page at the moment it was being updated. I would be very tempted to solve this problem with Template Toolkit's ttree utility. This looks like the kind of job that tool was made for.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re^2: Perl scripts making my site slow
by kingdean (Novice) on Jun 25, 2004 at 19:49 UTC
    Jeff, I am a novice, but I am learning. Let me give you an idea what I was thinking about and you tell me if this makes sense. If I update my index.html file, I upload it and everything is fine. The index.html calls upon several pages and updates automatically. If I put this index.html file in a directory say... (www.mysite.com/dontgohere/index.html) and I make a cron job look at that file and run it, then dump the page as a visitor would see in html into the file (www.mysite.com/index.html). Then when someone accesses my main page, it is just a html file and shouldn't be slow. Does this sound like it would work? Thanks Dean

      That sounds like it should work, but we are leaving out the specifics. Why don't you try this. Write a cron job that runs one of these scripts you speak of. Have it write the output to some .html file that a user will view. Set the cron job for every minute or 5 minutes until you get it working correctly, then set it to run ever a hour or two. If you have problems with this, then ask us specific questions about that in a new thread.

      Then, once you get all of that working ... you can look into Template Toolkit should you want to "upgrade" your system. ;) Cheers and good luck!

      jeffa

      L-LL-L--L-LL-L--L-LL-L--
      -R--R-RR-R--R-RR-R--R-RR
      B--B--B--B--B--B--B--B--
      H---H---H---H---H---H---
      (the triplet paradiddle with high-hat)