The profiler found that there are lots of empty dictionaries in instances of SCons.Node.FS.File, so I replaced a few of them with wrappers which only make a real dictionary when needed.
Before the change (output is from scons --debug=memory -n): After the change: So that small change (writing a lazy dictionary class which took about half an hour, and 28 other lines, mostly changing {} to lazydict()) has reduced memory usage by 2MB out of 24. Which is not bad, but not very big either. I'll have another look later to see what else can be reduced.
Sat Aug 27 2005 15:35 CET-1CEST Trying on SCons:
Memory before SConscript files: 7516160
Memory after SConscript files: 17731584
Memory before building: 17731584
Memory after building: 23470080
Memory before SConscript files: 7520256
Memory after SConscript files: 16392192
Memory before building: 16392192
Memory after building: 21549056
