Re: Q: How to improve CGI performance for this?
- From: "avtanski@xxxxxxxxx" <avtanski@xxxxxxxxx>
- Date: 13 May 2006 22:20:43 -0700
Jim Gibson wrote:
Something as simple as putting a sleep(1) in your code will slow
down responses. You can sleep for variable amounts of time, if
necessary.
I thought of this, but it seems that it won't help much. Since this is
a chat bot, the load mostly comes not from a single user chatting
too fast, but from too many users chatting at the same time - I think
that although this will have some effect, it will be small. But thanks
for the idea anyway.
You might consider putting your data into an indexed database
and doing indexed queries.
Good idea. I just finished writing the script to use such an index,
loaded from a file (not actual DB) using Storable (great module this
one, easy to use too!). Basically I rewrote some of the script logic
and now I have a script tha tis exactly 2.5 times faster! I was
hoping for more, but even this is significant improvement.
The last thing that I'm going to do now is to make the script to
check /proc/loadavg and to stop if the server is very busy. I hope
this will be enough to keep my hosting provider happy, :-)
Thank you all for your help and great advice!
Regards,
- Alex
.
- References:
- Q: How to improve CGI performance for this?
- From: avtanski@xxxxxxxxx
- Re: Q: How to improve CGI performance for this?
- From: x3v0-usenet@xxxxxxxxx
- Re: Q: How to improve CGI performance for this?
- From: avtanski@xxxxxxxxx
- Re: Q: How to improve CGI performance for this?
- From: Jim Gibson
- Re: Q: How to improve CGI performance for this?
- From: avtanski@xxxxxxxxx
- Re: Q: How to improve CGI performance for this?
- From: Jim Gibson
- Q: How to improve CGI performance for this?
- Prev by Date: Re: sort-like syntax
- Next by Date: FAQ 3.23 How can I get "#!perl" to work on [MS-DOS,NT,...]?
- Previous by thread: Re: Q: How to improve CGI performance for this?
- Next by thread: Re: Q: How to improve CGI performance for this?
- Index(es):
Relevant Pages
|