Closed
Bug 436877
Opened 17 years ago
Closed 16 years ago
Make "Since your last visit" not affect performance
Categories
(support.mozilla.org :: General, defect)
support.mozilla.org
General
Tracking
(Not tracked)
VERIFIED
FIXED
0.9.5
People
(Reporter: jason.barnabe, Assigned: ecooper)
References
Details
(Whiteboard: tiki_bug, tiki_upstreamed)
Attachments
(2 files)
10.68 KB,
patch
|
laura
:
review+
|
Details | Diff | Splinter Review |
26.19 KB,
image/png
|
Details |
http://groups.google.com/group/mozilla.support.planning/browse_frm/thread/277c67bb61cb0b73/89c456a105bce7ce
Limiting the number of items it'll load should do it.
another way could be limit it by language. It displayed changes for all wiki-pages, including those in a different language.
Comment 2•17 years ago
|
||
I'd like to put this on the radar as the functionality is important for contributors but performance is hindering us from using it.
Target Milestone: --- → 0.9
Updated•16 years ago
|
Target Milestone: 0.9 → 0.8.2
Updated•16 years ago
|
Assignee: nobody → smirkingsisyphus
Assignee | ||
Comment 3•16 years ago
|
||
Is it correct to assume we're talking about webroot/modules/mod-since_last_visit_new.php?
Assignee | ||
Comment 4•16 years ago
|
||
Instead of hacking the current webroot/modules/mod-since_your_last_visit_new.php, I created a new module and template. It reuses the same code architecture of the original, but adds limits for display and separates the counting query from the actual data-fetching query.
That being said, I'm still a little unsure about this, and I'm not sure how useful this will be.
I think the better alternative would be something like a devoted page contributors can visit to see changes since their last visit.
Assignee | ||
Comment 5•16 years ago
|
||
Bottom is expanded, top is not.
Limits can be specified for each type of change with a failsafe default of 25 (which can also be changed). In the screenshot, new posts have been arbitrarily limited to displaying the latest 3.
Comment 6•16 years ago
|
||
Where is this enabled? I forgot. I don't see any "since last visit" module in <https://support-stage.mozilla.org/tiki-admin_modules.php>.
Assignee | ||
Comment 7•16 years ago
|
||
On tiki-admin_modules.php, look under the "Assign new module". The original is listed under the "Module name" drop-down as "since_last_visit_new". It's currently disabled.
The patched version isn't on staging.
Assignee | ||
Comment 8•16 years ago
|
||
Did some basic benchmarking. The old queries seem to be able to return large datasets in a relatively timely manner (especially compared to some of tiki's more frequently used queries). This new module is faster never the less.
If anything, the problem looks like PHP had to also loop through the entire set (which as Jason noted can be massive), do some conditionals, do some permission checks, etc.
Comment 9•16 years ago
|
||
How much faster is the new module - 5%, 50%, 500%?
Assignee | ||
Comment 10•16 years ago
|
||
As I mentioned, the problem doesn't look like it's an issue with db queries (though, they've been made much more scalable), but with the code handling what the queries were returning.
As an example, passing 1000 new forum posts (Jason's original report said he saw 1700) to old module will cause a timeout locally. That means >60s execution time for the entire script (most likely poor smarty trying to parse and loop through a 1K array). The new module takes an extra .7s to load the page with the same data.
The real issue here is parsing and then passing massive arrays to smarty is very, very bad for script execution time.
(In reply to comment #9)
> How much faster is the new module - 5%, 50%, 500%?
Assignee | ||
Comment 11•16 years ago
|
||
Oh, I should also mention these numbers are local. On staging or production, performance should be even better.
Comment 12•16 years ago
|
||
Maybe it would be more efficient to create separate handling for this in PHP and somehow split the display of the site in such a way that the array is not passed to smarty?
For example, if we smarty->display the parts before and after the array using some smarty templates, but keep the array part in php. Would this work? Perhaps through duplicating some templates content. Maybe it's worth evaluating the work costs of doing this versus not.
Updated•16 years ago
|
Target Milestone: 0.8.2 → 0.9
Assignee | ||
Comment 13•16 years ago
|
||
If you passing a massive array to smarty, you're probably doing something wrong on the UX side of things. ;)
In any case, is everyone on board with me committing this new module for testing/refinement on staging?
Comment 14•16 years ago
|
||
Eric, can you get a review from e.g. Laura first? Otherwise I like the plan!
Assignee | ||
Updated•16 years ago
|
Attachment #357964 -
Flags: review?(laura)
Updated•16 years ago
|
Attachment #357964 -
Flags: review?(laura) → review+
Assignee | ||
Comment 15•16 years ago
|
||
Moving this to 1.0.
I'm getting a JS error when included on the contributor homepage and *only* the contributor homepage. If I figure it out tonight, I'll move it back into 0.9.
Target Milestone: 0.9 → 1.0
Comment 16•16 years ago
|
||
What's the status of this bug?
Assignee | ||
Comment 17•16 years ago
|
||
(In reply to comment #16)
> What's the status of this bug?
Should be in on staging Tuesday or Wednesday depending on the l10n dashboard progress.
Assignee | ||
Comment 18•16 years ago
|
||
I can't seem to reproduce the error in comment 15 after taking another look at this on two separate occasions over the last week. It's in r23339/r23340 and can be activated on staging by using the since_last_visit_lite module.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
(In reply to comment #18)
> I can't seem to reproduce the error in comment 15 after taking another look at
> this on two separate occasions over the last week. It's in r23339/r23340 and
> can be activated on staging by using the since_last_visit_lite module.
Error: setfolderstate is not defined
Source File: https://support-stage.mozilla.org/en-US/kb/Contributor+Home+Page
Line: 1030
Eric, was that the error message you saw?
Assignee | ||
Comment 20•16 years ago
|
||
(In reply to comment #19)
> Error: setfolderstate is not defined
> Source File: https://support-stage.mozilla.org/en-US/kb/Contributor+Home+Page
> Line: 1030
>
> Eric, was that the error message you saw?
No. I think that's related to the collapsible Admin folders in the right nav.
The error I saw prevented the module from expanding and collapsing. For some reason, an inline rule for visibility was (incorrectly) being set. I haven't seen it since, though.
I don't see comment 15's error either.
Marking verified fixed; I don't see end-user performance hits due to this, and it looks like Eric has done some performance testing too.
(Reopen if the crack I'm smoking is better than usual!)
Status: RESOLVED → VERIFIED
Updated•15 years ago
|
Whiteboard: tiki_bug
Comment 22•15 years ago
|
||
As we've been trying to reduce module duplication very recently, introducing yet an other module for recent changes is not an option. The fact that it's a separate file makes it very hard to see the changes.
One of the major changes is obviously the limitation of records displayed. Are there any other changes?
I would upstream this change by adding a parameter to the module instead.
Whiteboard: tiki_bug → tiki_bug, tiki_discuss
Comment 23•15 years ago
|
||
It seems to me that if LPH's solution in comment 22 isn't sufficient for us, we could always go back to using Eric's module in the SUMO installation. I'm not sure what other changes were made, but I'm pretty comfortable with whatever you think is best, Louis-Philippe.
Comment 24•15 years ago
|
||
The most important part of my message was "Are there any other changes?".
Comment 25•15 years ago
|
||
Applied a maximum amount of results fetched. If there are still performance issues after the port, they should be tracked individually rather than reverting to the old module.
Whiteboard: tiki_bug, tiki_discuss → tiki_bug, tiki_upstreamed
You need to log in
before you can comment on or make changes to this bug.
Description
•