Closed
Bug 887394
Opened 11 years ago
Closed 11 years ago
[Session Restore] Don't collect state right after startup when restoring the initial session
Categories
(Firefox :: Session Restore, defect)
Firefox
Session Restore
Tracking
()
RESOLVED
FIXED
Firefox 25
People
(Reporter: ttaubert, Assigned: ttaubert)
References
Details
(Keywords: perf)
Attachments
(1 file, 1 obsolete file)
2.80 KB,
patch
|
Yoric
:
review+
|
Details | Diff | Splinter Review |
http://mxr.mozilla.org/mozilla-central/source/browser/components/sessionstore/src/SessionStore.jsm#712
Right after restoring the initial state for the first window loaded after startup, we call .saveState() only to set the session state from STOPPED to RUNNING to count startup crashes correctly.
It would be great to just change the state without writing the whole file but we cannot do that. What we can do is at least not collect the browser state at a point where probably nothing has even finished restoring, yet.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #767900 -
Flags: review?(dteller)
Comment 2•11 years ago
|
||
Comment on attachment 767900 [details] [diff] [review]
don't collect state right after startup when restoring the initial session
Review of attachment 767900 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/components/sessionstore/src/SessionStore.jsm
@@ +714,5 @@
>
> // _loadState changed from "stopped" to "running"
> // force a save operation so that crashes happening during startup are correctly counted
> + this._initialState.session.state = STATE_RUNNING_STR;
> + this._saveStateObject(this._initialState);
Do we actually need the call to saveStateObject?
@@ +715,5 @@
> // _loadState changed from "stopped" to "running"
> // force a save operation so that crashes happening during startup are correctly counted
> + this._initialState.session.state = STATE_RUNNING_STR;
> + this._saveStateObject(this._initialState);
> + delete this._initialState;
Could we take the opportunity to remove that |delete| and replace it with an assignment? Calling |delete| destroys inline caching.
Attachment #767900 -
Flags: review?(dteller) → feedback+
Updated•11 years ago
|
Summary: Don't collect state right after startup when restoring the initial session → [Session Restore] Don't collect state right after startup when restoring the initial session
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #767900 -
Attachment is obsolete: true
Attachment #768277 -
Flags: review?(dteller)
Comment 4•11 years ago
|
||
Comment on attachment 768277 [details] [diff] [review]
don't collect state right after startup when restoring the initial session
Review of attachment 768277 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good.
It might also prove useful for the day saveState becomes async.
Attachment #768277 -
Flags: review?(dteller) → review+
Assignee | ||
Comment 5•11 years ago
|
||
Comment 6•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 25
You need to log in
before you can comment on or make changes to this bug.
Description
•