Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

[Difficult] Disable persistence of background script #38

Open
nareddyt opened this issue Mar 25, 2018 · 0 comments
Open

[Difficult] Disable persistence of background script #38

nareddyt opened this issue Mar 25, 2018 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@nareddyt
Copy link
Owner

The extension currently makes use of a persistent background page. This background script is always loaded in memory, possibly leading to extra battery usage.

We want to switch this to an event page. This only keeps the page loaded when an event (like the user visiting a new site) occurs. This could lead to minor battery savings if the user just has chrome open but isn't browsing the web.

This is a hard switch to make for two reasons:

  • In memory variables cannot be used for persistent storage. That means we need to parse the json files with the data every time a site is visited, possible degrading performance. Perhaps we can make use of the Chrome storage API?
  • We have to figure out how to declare an event to load the page whenever the user visits a new website.

This page has some good tips for migrating from a background page to an event page.

@nareddyt nareddyt added enhancement New feature or request help wanted Extra attention is needed labels Mar 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant