You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Reviewed. Medium priority, nominating for sprint 27. @redmunds - would you like to look into this further (since you already looked into it a bit :))? If not, feel free to reassign.
I think what we need to do is to unload (or "undefine") unit test modules after they are run.
The undef() method is part of requirejs (http://requirejs.org/docs/api.html#undef). A major caveat: "it will not remove the module from other modules that are already defined and got a handle on that module as a dependency when they executed", but that shouldn't affect unit test modules since they are independent.
Currently, unit test module require statements are hard-coded, so I think we need to dynamically load/unload each unit test module every time the tests are run. This means we'll have to refactor the code since Jasmine Spec Runner dialog is populated from module info.
I'm starting to think we're leaking memory due to closures. Randy's fix in #4313 addresses some of those issues around setup and teardown of a spec. There's a lot more work to do though.
I'm pretty certain now that we're leaking memory for every new brackets window we open.
Ignoring the integration tests (which are integrations tests because they open a new window), if I simply use the devtools timeline to measure memory while I open then close a series of windows view Debug > New Window, I see the Document and DOM Node counts climb up and up. GC helps some, but long after the windows are closed the Documents and DOM Nodes are still around.
Removing from sprint since the main issue it was causing (#4547) is now much alleviated by the collapsing of multiple unit test windows into one (thanks to @TomMalbran as well as @jasonsanjose).
Steps to repro
Results
Brackets gets really sluggish and uses up tons of memory.
Expected
Should be able to run all tests without running out of memory.