Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Random Top Nodes (nice)

by tye (Sage)
on Feb 08, 2004 at 05:58 UTC ( #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
Node Status?
node history
Node Type: note [id://327428]
help
Chatterbox?
[LanX]: Question: starting a script from an icon in Windows, but after C-c the window closes ... what I want is to restart in the cmd.exe. Recommendations?
[Corion]: LanX: What do you mean by "restart in the cmd.exe" ?
[Corion]: Do you want to launch a script and keep the command prompt/console window open?
[Corion]: Do you want to wait for a key press before closing the window?
[LanX]: I want the command line in the history
[tye]: -Mouse
[Corion]: Option a) would mean launching cmd.exe /k c:\path\to\ batchfile- launching-perl- script.cmd. Option b) would be to add pause as the last line of said batch file.
[LanX]: First day after holidays ... and already stressed by the fact that colleagues changed stuff without communication ... apparently I'm the only one trying to fight entropy
[Corion]: LanX: The command is always in the history if you typed it in before. If you didn't type the command into the command line, it will not be there. I think there is doskey which can stuff command lines into the history
LanX damns the cult of CB ;-)

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (13)
As of 2017-03-27 15:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (320 votes). Check out past polls.