Skip to content

Conversation

@thecrypticace
Copy link
Contributor

@thecrypticace thecrypticace commented Dec 17, 2025

Fixes #1519

We were calling startIfNeeded() but it did async work before assigning the connection which means if scan() is called once per project the flow looks like this:
Project 1-N: scan() -> startIfNeeded() -> check for existing connection -> await … -> setup connection -> done

Since projects are loaded via Promise.all(…) every single one will run all the way up to the await call, wait, fork a process, setup an RPC connection, and overwrite the this.helper and this.connection properties. I think the additional processes would stick around because of closure scopes but not 100% sure about that as they should've otherwise been unreferenced.

This PR changes the setup in a few ways:

  • The code that looks for the Oxide helper async is gone. The relative path is resolved at startup.
  • We synchronously store a promise to the object containing details to access the helper process
  • Most of the process is now synchronous with a small promise that waits for the process to become ready.

@thecrypticace thecrypticace merged commit 98895fb into main Dec 18, 2025
12 checks passed
@thecrypticace thecrypticace deleted the fix/issue-1519 branch December 18, 2025 19:36
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.

High CPU/RAM - Multiple app.css files causing multiple processes to spawn

2 participants