Menu

#6 Garbage collection between laps

open
nobody
None
5
2009-10-19
2009-10-19
No

Garbage Collector should be invoked before each lap, in order to reduce the noise of objects from the previous lap being collected in another lap.

I placed an invokation to System.gc(); just before watch.start() on line 144 of Circuit class.

Though GC cannot be forced, this suggest the VM to do its best effort on collecting garbage. I think this invocation is a good idea because othewise I could (in theory) penalize some database because several objects were created for another database.

One could also argue that GC should be requested between the watch calls.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.