A way to reduce out-of-memory errors

Sometimes, the language server contributes to out-of-memory errors while compiling code/packages. To prevent this, by default in all templates, prepend nice -19 to the languageServer start commands in .replit so that that process is shown less mercy by the OOM killer.

This would remove the need to fully sacrifice code intelligence to be able to compile the code ā€“ instead, the code intelligence can automatically go away when needed, which is often just for the final compilation stage.

I was trying to compile Swift code while being able to use code intelligence and not have to manually disable it just before the compiler gets to the final stage. Thought this might work to fix it, although I have yet to properly test. Of course, any other ways to fix this inconvenience would do

3 Likes

Hi @UMARismyname this is an excellent suggestion! Iā€™m going to share it with the engineers at Replit to see if they have any comments / further questions.

2 Likes