3 ms·
For node.js processes, like importer/exporter scripts and other timed scripts, I actually use the command line flag to expose garbage collection, and manually c
by tracker1 12y ago
For node.js processes, like importer/exporter scripts and other timed scripts, I actually use the command line flag to expose garbage collection, and manually call after each item... it keeps the memory allocation in check (20mb instead of climbing over several hundred before done processing), and it does a pretty nice job.
For services, I'd be more inclined to not call it as much, but given that all timed event scripts run on one server currently, and potentially simultaneously, I prefer it this way.
Even with gc based environments one should check on their actual memory usage. I worked on a game engine backend in .Net that would actually hang up for several seconds when GC ran... forcing GC more often kept things running a lot smoother. A fraction of a second for my use was an acceptable lag, but several seconds wasn't.