Closed Bug 726347 Opened 8 years ago Closed 8 years ago

[Page Thumbnails] add preference to disable capturing thumbnails in the background

Categories

(Firefox :: General, defect)

defect
Not set

Tracking

()

VERIFIED FIXED
Firefox 14
Tracking Status
firefox14 --- verified

People

(Reporter: mats, Assigned: ttaubert)

References

Details

Attachments

(2 files, 4 obsolete files)

It's really painful to try to debug anything to do with painting
with thumbnail drawWindow() calls happening every couple of seconds.
I can't find a way to turn this feature off...

I would like a preference, or environment variable, or configure
build option that turns off thumbnails.
Attached patch temporary hack to "turn it off" (obsolete) — Splinter Review
Summary: Need a way to suppress thumbnail drawWindow calls → [Page Thumbnails] add preference to disable capturing thumbnails in the background
Blocks: 497543
Assignee: nobody → matspal
I have no intention of fixing this myself.
Assignee: matspal → nobody
(Sorry was fixing a number of bugs on which people had forgotten to set the assignee, and was going by patch author)
Attached patch patch v1 (obsolete) — Splinter Review
Patch that introduces a pref to disable capturing thumbnails in the background for debugging/profiling purposes.
Assignee: nobody → ttaubert
Attachment #596369 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #614060 - Flags: review?(dao)
Comment on attachment 614060 [details] [diff] [review]
patch v1

We shouldn't sync this. I'm not sure this needs a default value in firefox.js either...
Attachment #614060 - Flags: review?(dao) → review-
Attached patch patch v2 (obsolete) — Splinter Review
(In reply to Dão Gottwald [:dao] from comment #5)
> We shouldn't sync this. I'm not sure this needs a default value in
> firefox.js either...

Yeah, we should be fine without all that for debugging purposes.
Attachment #614060 - Attachment is obsolete: true
Attachment #614068 - Flags: review?(dao)
Comment on attachment 614068 [details] [diff] [review]
patch v2

getBoolPref will throw now, which you'll need to catch.
Attachment #614068 - Flags: review?(dao) → review-
Attached patch patch v3 (obsolete) — Splinter Review
(In reply to Dão Gottwald [:dao] from comment #7)
> getBoolPref will throw now, which you'll need to catch.

Right...
Attachment #614068 - Attachment is obsolete: true
Attachment #614076 - Flags: review?(dao)
Comment on attachment 614076 [details] [diff] [review]
patch v3

What's the point of the extra method? This should be sufficient:

try {
  if (Services.prefs.getBoolPref(this._prefCapturingDisabled))
    return;
} catch (e) {}

You don't really need this._prefCapturingDisabled either...
Attachment #614076 - Flags: review?(dao) → review-
Attached patch patch v4Splinter Review
Attachment #614076 - Attachment is obsolete: true
Attachment #614085 - Flags: review?(dao)
Attachment #614085 - Flags: review?(dao) → review+
https://hg.mozilla.org/integration/fx-team/rev/51fe735d19a9
Whiteboard: [fixed-in-fx-team]
Version: unspecified → Trunk
If I set it off, then my new tab page thumbnails will never update? (or not show at all if there isn't one before the disabling of the pref)
Exactly.
https://hg.mozilla.org/mozilla-central/rev/51fe735d19a9
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 14
Comment on attachment 614085 [details] [diff] [review]
patch v4

[Approval Request Comment]
Risk to taking this patch (and alternatives if risky): very low risk, tiny patch
String changes made by this patch: none

I think we should backport this patch for Fx 12 and set the new preference to true - to disable capturing thumbnails at all. The thumbnail service is active in Fx 12 but there's not a single piece of code using it. We have patches for Fx 13/14 that will minimize the performance impact of this service but I think it doesn't make sense to backport them to 12.

If users change their prefs to test the early version of about:newtab in Fx 12 they might as well flip this pref to have thumbnails captured.
Attachment #614085 - Flags: approval-mozilla-beta?
Comment on attachment 614085 [details] [diff] [review]
patch v4

[Triage Comment]
The only reason to approve this for Beta 12 would be due to debug pain noted in comment 0. Since that was first noted 2 months ago, it's obviously not that painful. Let's leave things as is.
Attachment #614085 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120424 Firefox/14.0a1

Verified manually on latest Nightly. no thumbnails are captured for newly visited pages if the pref ("browser.pagethumbnails.capturing_disabled") is set to true.

verified on Ubuntu 11.10, Mac OS 10.6, Windows 7.
Status: RESOLVED → VERIFIED
(In reply to Virgil Dicu [:virgil] [QA] from comment #17)
> Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120424 Firefox/14.0a1
> 
> Verified manually on latest Nightly. no thumbnails are captured for newly
> visited pages if the pref ("browser.pagethumbnails.capturing_disabled") is
> set to true.
> 
> verified on Ubuntu 11.10, Mac OS 10.6, Windows 7.

This is a 'hidden' pref, i.e. has to be manually added ?
Yes, you have to create it yourself as a boolean with the value 'true'.
will this automatically delete the already created thumbnails after restart in the new thumb place or is it needed to do that manually ?
This will only prevent new thumbnails from being created. Existing ones can be deleted by clearing all your browsing history or removing the "thumbnails" directory from your profile.
Attached file Thumbnails
Adding the pref and enabling does stop the storage of new thumbnails, but ...

New folders are being created every day or even more often.
Since adding the pref looking at the Properties of the Thumbnails Folder on Win7 x64
0 Files, 256 Folders

Setting the pref to true should also prevent the creation of additional useless folders.  

Should a new bug be filed to prevent the creation of 'Empty Folder' (s) ?
Is there any reason why this preference in hidden in about:config ?
The MDN doc page of the browser.pagethumbnails.capturing_disabled pref shows the wrong meaning of this pref.

https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/Preference_reference/browser.pagethumbnails.capturing_disabled

true (default)
    The application creates screenshots of visited web pages.
false
    The application doesn't create screenshots of visited web pages.
(In reply to dickvl from comment #25)
> The MDN doc page of the browser.pagethumbnails.capturing_disabled pref shows
> the wrong meaning of this pref.

Thanks for noticing! I just fixed the documentation.
Duplicate of this bug: 795666
You need to log in before you can comment on or make changes to this bug.