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

Development server memory skyrockets after changing shaders #12164

Open
jjspace opened this issue Aug 28, 2024 · 2 comments
Open

Development server memory skyrockets after changing shaders #12164

jjspace opened this issue Aug 28, 2024 · 2 comments

Comments

@jjspace
Copy link
Contributor

jjspace commented Aug 28, 2024

I'm not sure if this actually classifies as a memory leak or just memory runaway with conflicting processes.

Reproduce

  1. Run npm start to have the local server running
  2. Open any .glsl file under the Shaders directory
  3. Modify and save that file
  4. Observe memory usage by node skyrocket

My best guess is that the file watchers we have set up get stuck in a competing loop or something where they're repeatedly noticing changes, rebuilding the glsl -> js files, noticing JS changes -> rebuilding the JS -> triggering file changes in the shaders -> rebuilding -> repeat.

@javagl
Copy link
Contributor

javagl commented Aug 28, 2024

If this shows up as a hard crash (some out-of-memory error) eventually, then I also noticed this occasionally recently. It also happened to me ~"when editing GLSL files", but I wasn't able (or did allocate the time) to pinpoint it to a specific workflow.

@jjspace
Copy link
Contributor Author

jjspace commented Aug 28, 2024

@javagl if I notice it fast I usually kill it or Ctrl+C the process but if I don't then it does result in an OOM error. I assume it shouldn't be that hard of a fix I just also haven't spent any time digging into it yet
Edit: I also noticed this gets waay worse if you save multiple times in quick succession. It seems our glslToJavascript is slow and you can kick off multiple of these async processes that overlap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants