Page 1 of 1

[0.12.3] Opening ingame console drops fps to 1

Posted: Wed Aug 12, 2015 6:37 am
by yeganer
Hey,

as i already noted in the irc if you open the console and the console history is quite full, especially with long lines (serpent.dump() of tables with several hundred entries) the fps will drop significantly.

I created this report just for reference since i think it's already fixed? for the next release.

Re: [0.12.3] Opening ingame console drops fps to 1

Posted: Wed Aug 12, 2015 10:15 am
by kovarex
Could you post your player-data.json file? It contains the history, so we can test against it.

Re: [0.12.3] Opening ingame console drops fps to 1

Posted: Wed Aug 12, 2015 11:46 am
by yeganer
Most of the output comes from dumping some mod related tables.

But i'd say the problem is that the game tries to render a huge string(several thousand characters) and it takes some time to do it. Since scrolling isn't possible cutting long strings to just display the last part could solve the issue.

for testing you could to something like

Code: Select all

/c global.test = {}
/c for i=1,10000 do; global.test[i] = "some long string";end
/c game.local_player.print(serpent.dump(global.test))
this may sound like a stupid thing to do but when dumping huge tables for debugging it can happen.

Re: [0.12.3] Opening ingame console drops fps to 1

Posted: Wed Aug 12, 2015 1:30 pm
by kovarex
Ok, fixed for 0.12.4, but don't forget, that you can still go to bigger extreme, so even work with the string itself will slow it down enough.

Re: [0.12.3] Opening ingame console drops fps to 1

Posted: Wed Aug 12, 2015 1:33 pm
by yeganer
Thanks for the fix, that will help quite a lot for debugging.

But i'd guess the working on the string would be a one time thing, so it would lag once only.

Re: [0.12.3] Opening ingame console drops fps to 1

Posted: Wed Aug 12, 2015 1:53 pm
by kovarex
yeganer wrote:Thanks for the fix, that will help quite a lot for debugging.

But i'd guess the working on the string would be a one time thing, so it would lag once only.
Yes, but I don't want to spend too much time on it.

Btw, it is limited to 1000 words per message when rendering, with "..." at the end.

And also limited, that it is not rendering console outputs that are above the top of the screen :)