Bangle.js: fix memory leak from HTTP requests #3148

Merged
joserebelo merged 1 commits from rigrig/Gadgetbridge:banglejs-fix-http-memory-leak into master 2023-06-05 10:09:31 +00:00
Contributor

Every call to Volley.newRequestQueue() creates a new global thread pool, which isn't automatically cleaned up once the request completes.
With this commit we create a RequestQueue around on first use, and reuse it for subsequent requests.

It leaked memory at about 1MB/request according to this post: https://forum.espruino.com/conversations/386933

Every call to Volley.newRequestQueue() creates a new global thread pool, which isn't automatically cleaned up once the request completes. With this commit we create a RequestQueue around on first use, and reuse it for subsequent requests. It leaked memory at about 1MB/request according to this post: https://forum.espruino.com/conversations/386933
rigrig added 1 commit 2023-05-31 18:53:22 +00:00
ci/woodpecker/pr/can_master_build Pipeline is pending Details
ci/woodpecker/pr/run_tests Pipeline is pending Details
831c1bf853
Bangle.js: fix memory leak from HTTP requests
Every call to Volley.newRequestQueue() creates a new global thread pool,
which isn't automatically cleaned up once the request completes.
With this commit we create a RequestQueue around on first use, and reuse
it for subsequent requests.
joserebelo added the
Bangle.js
label 2023-05-31 22:02:19 +00:00
Member

This looks great - thanks!

This looks great - thanks!
joserebelo merged commit 7e1685f5f9 into master 2023-06-05 10:09:31 +00:00
Member

@rigrig I merged the changes, but accidentally rebased your commit, which broke the signature.. Please let me know if this is OK, or whether I should revert the commit so that you can re-open a MR with a signed one

@rigrig I merged the changes, but accidentally rebased your commit, which broke the signature.. Please let me know if this is OK, or whether I should revert the commit so that you can re-open a MR with a signed one
Author
Contributor

Thanks!
The rebase is fine with me.

Thanks! The rebase is fine with me.
rigrig deleted branch banglejs-fix-http-memory-leak 2023-06-05 10:56:37 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Freeyourgadget/Gadgetbridge#3148
No description provided.