Closed
Bug 429529
Opened 16 years ago
Closed 16 years ago
Do not calculate page ranks every time /tiki-wiki_rankings.php is loaded
Categories
(support.mozilla.org :: General, defect)
support.mozilla.org
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: laura, Unassigned)
Details
(Whiteboard: tiki_bug, tiki_upstreamed)
Attachments
(1 file)
396 bytes,
patch
|
nkoth
:
review+
|
Details | Diff | Splinter Review |
This page is linked from the homepage. The pagerank calculation queries are bringing the database to its knees.
Reporter | ||
Comment 1•16 years ago
|
||
We'll also need a cron job to calculate these periodically.
Attachment #316264 -
Flags: review?(nelson)
Updated•16 years ago
|
Attachment #316264 -
Flags: review?(nelson) → review+
Reporter | ||
Comment 3•16 years ago
|
||
Pushed.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Whiteboard: tiki_bug
Comment 4•15 years ago
|
||
Removing the function call solves the performance problem, but this one cannot be upstreamed directly. It's quite a nasty function however and really does not deserve to be called every time. I see three options: * Run it as part of editpage. Because ranking is based on links, it should not vary any more than that. However, I saw quite a few problems with that page being too slow already. * Run it on demand, but set a timeout on it so it only runs like once an hour (configurable). * Let it run from cron. This cannot be the only option for the other installations. Any input?
Comment 5•15 years ago
|
||
James or morgamic: any input on the best approach here?
Updated•15 years ago
|
Whiteboard: tiki_bug → tiki_bug, tiki_discuss
Comment 6•15 years ago
|
||
tiki-editpage.php already times out, so the first option should be avoided if at all possible. The cron option works well for us--but do we really use this feature?--with the on-demand option being the most universal.
Comment 7•15 years ago
|
||
I suggest creating an admin panel for perf preferences, having those off by default. In turn, SUMO would turn them on. One of those prefs would cause the piece of code in question here to not be executed, while the admin option would make sure to mention "Note: enabling this breaks this functionality"
Comment 8•15 years ago
|
||
Paul's solution works, but there needs to be a mechanism to trigger the calculation. Either an on-demand option, the cron, or perhaps something like a random integer, 1-1000 and if you roll a 1, calculate the ranks.
Whiteboard: tiki_bug, tiki_discuss → tiki_bug
Comment 9•15 years ago
|
||
Used the dice roll approach. Limit can be changed using a preference. Using 1000 by default.
Whiteboard: tiki_bug → tiki_bug, tiki_upstreamed
You need to log in
before you can comment on or make changes to this bug.
Description
•