Closed Bug 1003719 Opened 10 years ago Closed 10 years ago

defer loading of referenced bug tooltips on show_bug

Categories

(Bugzilla :: Bugzilla-General, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: glob, Assigned: glob)

References

(Blocks 1 open bug)

Details

(Keywords: bmo-goal, perf)

populating the tooltips of referenced bugs causes overhead to the initial load time of show_bug which in most cases isn't required.

i crunched some data on how much time we'd save during the initial show_bug load if we skipped loading referenced bugs.  average saving was 2.27%, but the largest saving saw 12.87% saving in total show_bug time.

if the rpc feature is available we should:
- generate html which contains no tooltip
- once the page is loaded
  - find all bug references
  - extract the bug_id
  - call a new webservice method which generates the tooltips
  - populate the tooltips
Blocks: 355996
One of the reasons is because some bugs are not preloaded, see the first part of my patch in bug 912531.
(In reply to Frédéric Buclin from comment #1)
> One of the reasons is because some bugs are not preloaded, see the first
> part of my patch in bug 912531.

sure, but that's for process_bug, not show_bug.

in either case, i'll be removing preloading dependencies and duplicates from the preload function as the goal here is to shift the database hit until after show_bug has initially loaded.
(In reply to Byron Jones ‹:glob› from comment #2)
> in either case, i'll be removing preloading dependencies and duplicates from
> the preload function as the goal here is to shift the database hit until
> after show_bug has initially loaded.

This doesn't make sense. The aliases of dependent bugs are still displayed in the UI (independently of tooltips), and so you must know if you can see them before deciding if you display the alias or the bug ID. I don't see what you try to fix by removing them from preload().
(In reply to Frédéric Buclin from comment #3)
> This doesn't make sense. The aliases of dependent bugs are still displayed
> in the UI (independently of tooltips), and so you must know if you can see
> them before deciding if you display the alias or the bug ID. I don't see
> what you try to fix by removing them from preload().

ah, my bad.  my reading of the preload code yesterday lead me to incorrectly believe it was creating full bug objects, not working on just the IDs.  it doesn't need to be touched.

looking at how dependencies are loaded, there's probably savings to be made by changing _bugs_in_order to look in the caches and use new_from_list only for bugs not already loaded.  the hard part of hooking new_from_list with the caches is sorting, but that isn't an issue in this case.
i've spent some time working through this change, however it's becoming increasingly complicated due to the edge cases we need to support (references to bugs that don't exist, we need to do more than just tooltips), i feel the complexity of this solution outweighs the benefits.

instead i'll be working on bug 1028795, which also aims to optimise referenced bug loading but using a completely different method.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.