Vhati wrote:C'mon, 600 megs!? There is no way text is being handled that inefficiently.
600 MB is 600 000K in task manager... I'm testing it now, the program uses ~35 000K before parsing, and ~44 000K after parsing. Odd... No idea how to explain the Mac spike
Vhati wrote:Pegging the CPU usually means a thread is doing an endless loop without blocking/sleeping.
So it's the main program loop. I'll take a closer look at that, I remember messing a bit with it...
Edit:So that was pretty bad. From
Code: Select all
while (!shell.isDisposed())
display.readAndDispatch();
to:
Code: Select all
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
CPU usage down from 50% at all times to 0-2% while not parsing. Whooops
ApexMods wrote:This is an example where EC will throw the aforementioned error, although 595 pixels divided by 35 pixels is... 17, and not 9.
Found the culprit - the animSheet tags are repeated:
Code: Select all
<animSheet name="bomb_fire" w="595" h="50" fw="35" fh="50">weapons/bomblauncher_fire_strip17.png</animSheet>
<weaponAnim name="bomb_fire">
<sheet>bomb_fire</sheet>
<desc length="17" x="0" y="0"/>
...
</weaponAnim>
...
<animSheet name="bomb_fire" w="315" h="35" fw="35" fh="35">weapons/bomb_fire_strip9.png</animSheet>
<anim name="bomb_fire">
<sheet>bomb_fire</sheet>
<desc length="9" x="0" y="0"/>
<time>0.35</time>
</anim>
Anims and weaponAnims can be distinguished from one another without a problem, but the <animSheet>s share the same name, and thus overwrite each other, and there's no way for me to distinguish them at runtime...
Ah, the importance of good naming habits. Adding "_launcher" at the end of the name of the first sheet would've fixed that...
Vhati wrote:I'm trying to narrow down where the problem is, the way SMM generates text, or the way the Error Checker is showing it.
I'm somewhat positive that it's the GUI's fault - IIRC SWT creates instances of native OS widgets, so the StyledText widget may be expecting Mac-style line endings by default...
I'm reading through the documentation now.