Commit graph

3 commits

Author SHA1 Message Date
Grigory Kruglov
03794ddc5b [components] Avoid eagerly rehydrating EngineSessionState for recently closed tabs
This change splits out tab-specific data from RecoverableTab data class
into a separate TabState (so, it doesn't have the EngineSessionState).

Then, once we have the simplified TabState, everything that touches RecentlyClosedTabs
is converted to use that instead of its more expensive sibling.

This way we avoid having to eagerly process EngineSessionState simply to populate BrowserState.closedTabs.
This saves us from having to hit disk (where the EngineSessionState is persisted) on initializing BrowserState (so, startup in most cases).
It also saves us from having to parse/rehydrate that persisted state.

At the point we actually need the EngineSessionState for a tab we'd like to restore, we can read/process it.
2022-02-14 14:54:00 -08:00
Sebastian Kaspari
b68d7f6c47 [components] Move FakeContext and FakeSharedPreferences to support-test-fakes component 2021-12-06 15:19:50 +00:00
Sebastian Kaspari
c92b48efaf [components] Create support-test-fakes component and move FakeEngine implementation to it 2021-12-06 15:19:50 +00:00