Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Random Top Nodes (nice)

by tye (Sage)
on Feb 08, 2004 at 05:58 UTC ( [id://327428]=note: print w/replies, xml ) Need Help??


in reply to Random Top Nodes

I like the idea. It may be quite a bit more efficient to compute the XP cut-off nightly (when $NORM is computed and votes are handed out) so the DB can throw out nodes as it scans instead of having to sort them all in order to find the top 1000 (is MySQL smart enough to use a limited-size heap for such?). Yes, even the current non-random listings could probably benefit from such a change.

Then there is the risk of people reloading the page over and over to get different samples and the DB load of such. Probably worth trying after I work out the current web server performance issues that caused me to roll back the DB performance stats gathering...

Perhaps Best Nodes should only list best of year, best of month, best of week, and best of day while a separate node lists a random selection of all-time best nodes.

- tye        

Replies are listed 'Best First'.
Re: Re: Random Top Nodes (nice)
by liz (Monsignor) on Feb 08, 2004 at 14:01 UTC
    ...while a separate node lists a random selection of all-time best nodes.

    I would be for that. And I think that could be done rather cheaply by just determining the top 1000 nodes of all time only once a day or so. If it were plain mod_perl, I would just store the id's of those 1000 in an array at a server start time (before forking) and randomly select from that from memory without ever touching the disk. It would only make startup a little longer, but would not affect runtime in general.

    Liz

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://327428]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-23 20:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found