|There's more than one way to do things|
When does XML get to be too much?by newrisedesigns (Curate)
|on Jan 24, 2003 at 20:09 UTC||Need Help??|
newrisedesigns has asked for the
wisdom of the Perl Monks concerning the following question:
I have a script on my server that processes a large flat-file. The script takes about a second or so to process the information and return it to the user. Considering the possible hazard in having many people use the script, I decided to code some countermeasures to prevent the users from reloading too many times in a row and give them a limit per day.
This works great, except for the fact that I store their IP, last request time, and number of visits in an XML file. Right now, with only 20 or so visitors the file is at 2kb. When more unique users visit this page, the XML file will continue to grow. Will this become a future bottleneck? It would be really ironic if a security measure intended to relieve strain on a server causes more than it prevents.
The XML looks like this:
The code for checking the XML looks like this:
Striving for better code,