Closed
Bug 726929
Opened 13 years ago
Closed 13 years ago
large session restore screenshots taken too often
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 13
People
(Reporter: blassey, Assigned: blassey)
References
Details
Attachments
(1 file, 1 obsolete file)
|
3.04 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
This is slowing down several things, including the tabs tray and various dialogs
Attachment #596937 -
Flags: review?(mark.finkle)
Comment 1•13 years ago
|
||
Comment on attachment 596937 [details] [diff] [review]
patch
>+ ViewportMetrics viewportMetrics = mSoftwareLayerClient.getGeckoViewportMetrics();
>+ String viewportJSON = null;
>+ if (viewportMetrics != null)
>+ viewportJSON = viewportMetrics.toJSON();
>+ if (viewportJSON == null || viewportJSON.equals(mLastViewport) &&
>+ mLastTitle.equals(lastHistoryEntry.mTitle) &&
>+ mLastSnapshotUri.equals(lastHistoryEntry.mUri))
> return;
Can we drop the mLastTitle check and move the mLastSnapshotUri check into it's own if-block above the viewportMetrics check?
Attachment #596937 -
Flags: review?(mark.finkle) → review+
| Assignee | ||
Comment 2•13 years ago
|
||
(In reply to Mark Finkle (:mfinkle) from comment #1)
> Comment on attachment 596937 [details] [diff] [review]
> patch
>
>
> >+ ViewportMetrics viewportMetrics = mSoftwareLayerClient.getGeckoViewportMetrics();
> >+ String viewportJSON = null;
> >+ if (viewportMetrics != null)
> >+ viewportJSON = viewportMetrics.toJSON();
> >+ if (viewportJSON == null || viewportJSON.equals(mLastViewport) &&
> >+ mLastTitle.equals(lastHistoryEntry.mTitle) &&
> >+ mLastSnapshotUri.equals(lastHistoryEntry.mUri))
> > return;
>
> Can we drop the mLastTitle check and move the mLastSnapshotUri check into
> it's own if-block above the viewportMetrics check?
My thought was that if the title changed, our screenshot was probably stale. Also, now that I look at this it was supposed to be:
> >+ if ((viewportJSON == null || viewportJSON.equals(mLastViewport)) &&
> >+ mLastTitle.equals(lastHistoryEntry.mTitle) &&
> >+ mLastSnapshotUri.equals(lastHistoryEntry.mUri))
> > return;
| Assignee | ||
Comment 3•13 years ago
|
||
(In reply to Brad Lassey [:blassey] from comment #2)
> My thought was that if the title changed, our screenshot was probably stale.
> Also, now that I look at this it was supposed to be:
>
>
> > >+ if ((viewportJSON == null || viewportJSON.equals(mLastViewport)) &&
> > >+ mLastTitle.equals(lastHistoryEntry.mTitle) &&
> > >+ mLastSnapshotUri.equals(lastHistoryEntry.mUri))
> > > return;
Actually, scratch that. What's in the patch is right. Also, this apparently needs a comment since it confused me.
| Assignee | ||
Comment 4•13 years ago
|
||
re-requesting review since I didn't drop the title check
Assignee: nobody → blassey.bugs
Attachment #596937 -
Attachment is obsolete: true
Attachment #597172 -
Flags: review?(mark.finkle)
Updated•13 years ago
|
Attachment #597172 -
Flags: review?(mark.finkle) → review+
Comment 5•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 13
Comment 7•13 years ago
|
||
From IRC discussion, here are more options for improvement:
1) reducing the number of spurious document-stop events we're getting (~20-30 on CNN)
2) better coalescing of the screenshot runnables
3) not screenshotting during a pan
4) fixing getBitmap() to work with OGL layers
| Assignee | ||
Comment 8•13 years ago
|
||
(In reply to Kartikaya Gupta (:kats) from comment #7)
> From IRC discussion, here are more options for improvement:
>
> 1) reducing the number of spurious document-stop events we're getting
> (~20-30 on CNN)
> 2) better coalescing of the screenshot runnables
> 3) not screenshotting during a pan
> 4) fixing getBitmap() to work with OGL layers
Kats, can you please file follow up bugs for each of those?
Comment 9•13 years ago
|
||
I filed bug 727701 and bug 727703 for the first two items on the list. The third one actually shouldn't be a problem; if the (one and only) document-stop event happens while the user is panning, there shouldn't be a problem with using that image as the thumbnail, and the runnable-coalescing should prevent grabbing multiple useless screenshots because the user is panning.
For the 4th item on the list, there's already bug 725120 which seems like a general catch-all for getBitmap(), so I'll add a comment there.
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•