|
From: Braden M. <br...@en...> - 2009-03-04 07:32:16
|
On Sat, 2008-09-27 at 01:58 -0400, Braden McDaniel wrote: [snip] > So far I've pared browser.cpp down to a little more than 6000 lines. > Compiling on my x86_64 Linux machine, its high-water mark in memory is > around 1.3 GB. If that sounds big, consider that before this surgery it > was taking at least 2.2 GB to compile. (And recall that for a 32-bit > platform, you can expect to cut this memory footprint roughly in half.) > > I suspect that the better part of that 1.3 GB footprint has to do with > the fact that two big Spirit parsers get instantiated in browser.cpp. > Pushing these instantiations out to different translation units would > probably be a significant win; and that's something I'll probably pursue > before releasing 0.18. My most recent commit makes good on this threat. I moved the parser instantiations to src/libopenvrml/openvrml/local/parse_vrml.cpp. The parse actions classes were the biggest chunk of code directly involved here; they're now in src/libopenvrml/openvrml/local/parse_vrml.h. This means the most expensive-to-compile file is now parse_vrml.cpp; what's left of browser.cpp should be pretty trivial. On my machine, parse_vrml.cpp's high water mark in memory seems to be somewhere between 900 MB and 1 GB. I think this means that OpenVRML should compile comfortably in a non-parallel build on 64-bit machines with at least 2 GB of memory; and on 32-bit machines with at least 1 GB of memory. For machines with more memory, OpenVRML's build will parallelize pretty nicely. I think the above minimums are pretty reasonable. So I'm inclined to consider this pursuit done unless another problem emerges. -- Braden McDaniel e-mail: <br...@en...> <http://endoframe.com> Jabber: <br...@ja...> |