Opened 9 years ago

Closed 9 years ago

#591 closed defect (fixed)

gui_chili_funks_console.lua StackPanel spikes CPU when there are many messages in console

Reported by: beherith Owned by:
Priority: major Milestone: BAR Beta release
Component: Chili Version:
Keywords: Cc:


If I have anything debugging that writes 1 line per frame to the console (with spring.echo), then performance instantly grinds to 1 fps, with chili framework adding a huge load.

This is probably due to the chili Stackpanel implementation. Disabling the widget solves the problem.

Change History (4)

comment:1 by Bluestone, 9 years ago

I tried adding a caching mechanism to it, where a new msgbox (i.e. a child of log) was only created 3 times per frame. It worked but then I decided it was a bit hacky & wondered if there there would be a better way to use chili for this, but I don't know how.

Last edited 9 years ago by Bluestone (previous) (diff)

comment:2 by Funkencool, 9 years ago

If they contain the same text the easy solution would be a duplicate indicator.

Otherwise I think your caching idea would do until the source of the issue is found/fixed.

comment:3 by Bluestone, 9 years ago

It turns out that, at least for me, this problem is (mostly) due to the amount of children of the stackpanel - spamming messages doesn't cause a huge slowdown but it grinds to a halt as the stackpanel accumulates more and more children.

comment:4 by Bluestone, 9 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.