armory3d/zui

Improve TextArea performance

mundusnine opened this issue · 4 comments

Right now how the rendering of text for the text area works is we render every line of text supplied by the user which makes it so that even text that isnt visible renders which impacts performance when we have long text files.

Elements which are not visible should never render in zui. Is it not behaving that way?

Maybe its not the rendering but the for loop of the textArea that makes it linear/slow ? i.e.: here

Because the text.split will give us every line of all the text and we dont stop calling the ui.text even if the height of lines is greater then the window height they are in.

Aha so you are already experiencing bad perf, will investigate then!

So I tried recreating the bug on my end to see if the perf issues where really related to the textarea. So I tested with a big big file without issues 11000 lines. So this can be closed. Sorry for the trouble. Was probably something on my end and I thought that the textarea rendering was the cause because of its linearity.