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

fix: memory leaks #1442

Merged
merged 39 commits into from
Sep 16, 2024
Merged

fix: memory leaks #1442

merged 39 commits into from
Sep 16, 2024

Conversation

arthurgeron
Copy link
Contributor

@arthurgeron arthurgeron commented Aug 30, 2024

Closes #1416

  • All Service Worker services now have a destroy or close method;
  • Ensure all Services' listeners, connections and connections are properly removed on destroy;
  • Removed all logic that forced the Service Worker to stay awake;
  • Ping JSONRPC event no longer triggers Keep Awake logic;
  • Allow service worker to be paused and resumed;
  • Ensure the Service Worker is properly restarted on update;
  • PopupServer instances will automatically self-destroy after being used, as they can be re-created when needed;
  • Avoid permanent interval by only starting auto-lock timer when wallet is unlocked;
  • Avoid permanent Content Script interval/looped calls by opening connection, if closed, when needed;
  • Previously if any of the services threw an exception the service worker would stop working, now it restarts and resumes execution
  • Updated Dexie to 3.2.7, which brings fixes around a DB corruption bug
  • Updated Fuel SDK to 0.94.5
  • Fixed error in parsing headers, in Provider's middleware, when the selected network goes offline.

LuizAsFight and others added 3 commits September 12, 2024 16:50
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to master, this PR
will be updated.


# Releases
## @fuels/[email protected]

### Patch Changes

- [#1466](#1466)
[`37733415`](3773341)
Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - bump version

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Closes #1458

---

| 📷  Demo |
| --- |
| <img width="374" alt="Screenshot 2024-09-10 at 16 12 33"
src="https://github.com/user-attachments/assets/dc62f4f7-3d32-4ca0-b2a6-6d3b60202e21">
|
@LuizAsFight LuizAsFight merged commit 32abae8 into master Sep 16, 2024
15 checks passed
@LuizAsFight LuizAsFight deleted the ag/fix/memory-leaks branch September 16, 2024 22:23
LuizAsFight pushed a commit that referenced this pull request Sep 17, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to master, this PR
will be updated.


# Releases
## [email protected]

### Minor Changes

- [#1468](#1468)
[`ce5925c9`](ce5925c)
Thanks [@helciofranco](https://github.com/helciofranco)! - Allow users
to switch to or create a network through the `selectNetwork` flow,
selecting it if it already exists or creating it if not.

### Patch Changes

- [#1469](#1469)
[`2a626b6b`](2a626b6)
Thanks [@helciofranco](https://github.com/helciofranco)! - Fix long
network URLs breaking layout by enabling word wrapping.

- [#1475](#1475)
[`ff39a99b`](ff39a99)
Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - fix: show
feedback when try to unlock with invalid password

- [#1476](#1476)
[`e555035a`](e555035)
Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - chore: add
success feedback when resetting the wallet

- [#1442](#1442)
[`32abae8c`](32abae8)
Thanks [@arthurgeron](https://github.com/arthurgeron)! - Refactored
Service Worker and Content Scripts to close running processes and
listeners correctly. Fixes memory leaks.

- Updated dependencies
\[[`32abae8c`](32abae8)]:
    -   @fuel-wallet/[email protected]

## @fuel-wallet/[email protected]

### Patch Changes

- [#1442](#1442)
[`32abae8c`](32abae8)
Thanks [@arthurgeron](https://github.com/arthurgeron)! - Refactored
Service Worker and Content Scripts to close running processes and
listeners correctly. Fixes memory leaks.

## @fuel-wallet/[email protected]

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memory leak on service-worker-loader
4 participants