numerobis wrote:
The problem is that sketchup is only 32 bit, so it can't address more than 2GB RAM - ( crash for me normally at ~1,6-1,7GB) I have noticed that depending on the scene size and content the sketchup ram usage is increased after export. For example if it is 800MB before export it stays at ~1100MB after export. So if it needs 700MB to export the scene it will crash during the second export.
As Jason was saying, provided that you have a 64bit operating system, then you will want more than 4GB, in order to let SketchUp access the maximum memory it is physically capable of addressing (this should be roughly 4GB).
On the question of memory being taken and not released, it is slightly more complex than it sounds when stated that way; the plugin's act of requesting data may alter the environment in ways outside of its control. For example, when first opened, SketchUp uses 87MB on my machine; after opening a file that raises usage to 166MB, and then opening a new one, memory usage drops to 120MB. This does not mean that SketchUp is leaking memory: it may be that the act of opening a document has caused delay-loaded code and features to be used, which are designed, once loaded, not to be unloaded again, or not to be unloaded until it is actually necessary to do so. Meaning, I cannot guarantee that the 'lost' memory would not be reclaimed at some future point. Considering again the file in question, if I export an MXS from this file, the first time, memory usage goes from 166MB to 193MB and then drops to 181MB; exporting again, however, it drops to 150MB after the export. The next three times, it ends up at 156MB. I have no way of determining the cause of this inconsistency; it may be by design, or it may not -- the only thing I can tell you is that it is not happening inside of my own code.
Performing a similar test using one of my standard test files, which I got from Francois, and which used to run out of memory when exporting with the previous plugin, the memory usage pattern looks like this (the meaning is maximum usage > usage after export):
- baseline: 320
- export MXS: 533->328
- export MXS: 533->325
- export MXS: 534->325
- export MXS: 534->327
- export MXS: 534->327
- export MXS: 535->327
- export MXS: 535->323
- export MXS: 535->324
- export MXS: 535->325
- export MXS: 535->324
This is pretty consistent, and clearly, no memory is being left unreleased by the plugin's exporter. It may be different in your case though, since not every model is the same; there could be a unique combination of factors that come together to produce an unexpected behavior. It could be that there is a particular .jpg that you commonly use, which triggers an obscure bug -- it could be anything.