Closed Bug 493559 Opened 15 years ago Closed 15 years ago

The 'Clear Recent History' dialog can be too slow when Everything is selected.

Categories

(Firefox :: Private Browsing, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 3.6a1

People

(Reporter: alfredkayser, Assigned: adw)

References

Details

(Keywords: perf, verified1.9.1)

Attachments

(1 file)

Currently the 'Clear Recent History' dialog uses the prefpane construct, with all the overhead causing serious delay in opening that window. The dialog is actually just a dialog with only a direct action (and not option configuration). This will make the xul code much simpler, and therefor faster. The opening of this dialog will be much faster if it is a plain dialogbox.
How much overhead do prefpanes have? Have you performed a test comparing the launch times of prefpane based dialogs with normal XUL dialogs?
Whiteboard: [invalid?]
Version: unspecified → Trunk
I haven't measured it, but the overhead (if it exists) would probably comes from its' close ties with the pref service...
(In reply to comment #2) > I haven't measured it, but the overhead (if it exists) would probably comes > from its' close ties with the pref service... Yeah, but the pref service should be fairly fast in many cases. Without numbers, we can't judge whether the pref service overhead is significant against the rest of the XUL window creation overhead or not.
(In reply to comment #3) > (In reply to comment #2) > > I haven't measured it, but the overhead (if it exists) would probably comes > > from its' close ties with the pref service... > > Yeah, but the pref service should be fairly fast in many cases. Without > numbers, we can't judge whether the pref service overhead is significant > against the rest of the XUL window creation overhead or not. And not only that, we'd still need to read those prefs when the dialog is loading even without using prefpanes, so unless there is something slow specific to the prefpane implementation, this bug is INVALID (and in that case, we'd probably want to optimize that code instead of switching over the CRH dialog to a normal XUL dialog).
Attached patch patch v1 (deleted) — Splinter Review
Yeah, this is my fault. When you select "Everything" in the dropdown, you're shown a warning that all history will be deleted. That warning used to show the date of the oldest item in history, but there were problems with localization, so we took it out at the last minute (bug 480169 comment 48). I neglected to remove the logic used to compute that date. If you have lots of history, it can be slow. I suspect the OP is experiencing this but wasn't sure what to blame it on. To reiterate, you should only notice slowness the first time the warning panel is shown when "Everything" is selected in the dropdown. That could be on dialog open if you seleceted "Everything" the last time the dialog was open, or it could be when you select "Everything" yourself. Alfred, could you confirm that?
Assignee: nobody → adw
Status: NEW → ASSIGNED
Attachment #378230 - Flags: review?(johnath)
Whiteboard: [invalid?]
Blocks: 480169
No longer depends on: 480169
Yes, that indeed seems a performance problem. Morphing the bug accordingly.
Keywords: perf
Summary: The 'Clear Recent History' dialog should not use prefpane and such. → The 'Clear Recent History' dialog can be too slow when Everything is selected.
To confirm from me, the 'Everything' is indeed the bottleneck here. (I still think that using 'prefwindow' and friends is overhead for this dialogbox, but it is difficult to measure any overhead precisely, so even if the 'Everything' issue is solved, I still would want to have prefwindow replaced by dialog. I am also not sure if prefwindow has the right behaviour for this dialog, especially on Mac, where prefwindows are kind of special).
Attachment #378230 - Flags: review?(johnath) → review+
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.6a1
Comment on attachment 378230 [details] [diff] [review] patch v1 Zero-risk, a performance win for 1.9.1.
Attachment #378230 - Flags: approval1.9.1?
Attachment #378230 - Flags: approval1.9.1? → approval1.9.1+
Keywords: checkin-needed
Verified fixed with a couple of thousands history items on trunk and 1.9.1 with: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090527 Minefield/3.6a1pre ID:20090527031500 Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1pre) Gecko/20090527 Shiretoko/3.5pre ID:20090527031214
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: