theia icon indicating copy to clipboard operation
theia copied to clipboard

Theia not suitable on memory-limited environments

Open sr229 opened this issue 7 years ago • 2 comments

In memory-limited environments, this would make Theia IDE not suitable as it can usually go over the 512MB limit as I tested it meticulously (which causes OutOfMemory backoff on OpenShift).

Contrast this to a competing Node.js IDE, Cloud9, which only consumes 140-200 MB of operational backend memory and 90MB-100MB idle, Theia goes over the limit and eats from a increase to 140 idle MB and just OOMs when during operational use.

Maybe we should optimize the IDE for memory-limited environments or allow to set node GC options directly in the theia call in yarn

sr229 avatar Oct 06 '18 08:10 sr229

However there is a workaround for the memory problem:

if using the theia CLI, instead of calling theia start projectFolder/, you have to call main.js directly with your preferred GC options, something like node --expose-gc --max-old-space-size=128 --max-new-space-size=256 /home/theia/src-gen/backend/main.js projectFolder/. For electron however, we could use the node options flag to pass this.

sr229 avatar Oct 06 '18 08:10 sr229

max-new-space-size seems not to be a valid option. See https://nodejs.org/docs/latest-v16.x/api/cli.html for available cli options.

BrightKn1ght avatar Feb 06 '24 10:02 BrightKn1ght