Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup background script #487

Merged
merged 5 commits into from
May 18, 2019
Merged

Conversation

ebeloded
Copy link
Contributor

It seems that we had some leftover code, which was bloating the background script and increasing the memory usage while the app was idle.
Closes #379

There was also a debounce set on app initialization. With this PR the app will start loading immediately (you could definitely tell the half second difference).

If double-clicking is a real concern, we can inline a throttle function (debounce was the wrong function here and we don't need to import 70KB of lodash for this).

@ebeloded ebeloded requested a review from SebastienGllmt May 17, 2019 05:20
@shinsuny shinsuny added the NFC No Functional Change (pure refactoring/cleanup) label May 17, 2019
@SebastienGllmt
Copy link
Contributor

I noticed you removed all usage of bluebird. If this is really no longer required, you can remove it from the package.json also. I never removed it because I never knew what this line is referring to

// let chrome extension api support Promise

@ebeloded ebeloded requested a review from shinsuny May 17, 2019 08:23
@SebastienGllmt
Copy link
Contributor

I added the debounce back but setting leading: true since I feel like debounce is what we want in this case.

@SebastienGllmt SebastienGllmt merged commit 924ba36 into develop May 18, 2019
@SebastienGllmt SebastienGllmt deleted the cleanup-background-script branch May 18, 2019 16:45
@SebastienGllmt SebastienGllmt mentioned this pull request Jun 15, 2019
2 tasks
This was referenced Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NFC No Functional Change (pure refactoring/cleanup)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Large memory footprint while idle
3 participants