Skip to content

Commit 5da5e3b

Browse files
committed
More memory use reductions
1 parent 6a3cf3c commit 5da5e3b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/server.d

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ int main(string[] args)
101101
sw.stop();
102102
Log.info(ModuleCache.symbolsAllocated, " symbols cached.");
103103
Log.info("Startup completed in ", sw.peek().to!("msecs", float), " milliseconds.");
104+
import core.memory : GC;
105+
GC.minimize();
104106

105107

106108
// No relative paths
@@ -162,7 +164,10 @@ int main(string[] args)
162164
s.send(responseBytes);
163165
}
164166
if (request.kind & RequestKind.addImport)
167+
{
165168
ModuleCache.addImportPaths(request.importPaths);
169+
GC.minimize();
170+
}
166171
if (request.kind & RequestKind.autocomplete)
167172
{
168173
Log.info("Getting completions");

0 commit comments

Comments
 (0)