<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class="ApplePlainTextBody"><br>Am 02.09.2009 um 21:33 schrieb Max Horn:<br><br><blockquote type="cite"><br></blockquote><blockquote type="cite">Am 16.08.2009 um 03:41 schrieb Neil Millstone:<br></blockquote><blockquote type="cite">[...]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I was looking at the Saga memory usage again today. By poking around<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">stack dumps when it crashed, I tracked down the ~200Kb alloc which<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">makes<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">the game crash to the path finder in Actor::fillPathArray(). This<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">function sometimes causes a 16384 element Common::Array of<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">PathDirectionData to be created while it is in operation. This<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">comes to<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">196608 bytes.<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I commited a change (rev 43912) which changes the array to a queue<br></blockquote><blockquote type="cite">(using Common::List instead of Common::Array), and now removes<br></blockquote><blockquote type="cite">elements that are not needed anymore. While that has a somewhat higher<br></blockquote><blockquote type="cite">overhead per element, the result is that the maximal size of the<br></blockquote><blockquote type="cite">collection during the chess (intro) scene in ITE shrinks from over<br></blockquote><blockquote type="cite">10,000 down to 110-250. That *should* save another 100kb or so, but I<br></blockquote><blockquote type="cite">didn't measure it precisely. Hopefully it helps anyway :).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Yay for basic computer science knowledge :). A pity so many coders<br></blockquote><blockquote type="cite">(e.g. the original SAGA authors, it seems?) lack it or don't apply it :<br></blockquote><blockquote type="cite">(.<br></blockquote><blockquote type="cite"><br></blockquote><br>To clarify that: My change went only to trunk, and received only light testing. Nevertheless I am convinced that it is save... So if somebody could test it some more, it might be a good idea to backport it to the branch.<br><br>Cheers,<br>Max<br></body></html>