in reply to count sort & output II
..won't work. Whoever suggested using this must have assumed you were running this script from the command line. If you want to get back only 10 results at a time from your CGI script, you need to either:unless (++$counter % 10) { print "Press Enter"; <STDIN> }
You may want to do some debugging to see where the major slowdown is.. If it's the while loop, there's probably not a lot you can do, but if it's in the sorting and copying of the hash keys (BTW, how big does this hash end up?), you may want to consider a non-hash-based solution. Your for-loop has to make a copy of all the hash keys in memory, which may take a long time, considering your HTTP-referer strings are all probably fairly long. Other monks might have some good ideas about improving this portion of the code, but I'm at a loss at the moment.
Good luck,
blokhead
1: Of course, this is not true if your script is running under mod_perl, but it doesn't look like it
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: count sort & output II
by mkent (Acolyte) on Dec 19, 2002 at 22:16 UTC |