Improve performance for setting .text on textfields
Improve performance for setting .text on textfields
Currently, setting a large amount of characters on a textfield is slow. Setting textfield.text to a string with ~6000 characters in it takes ~6.5ms according to the ingame profiler. Is there anything that could be done to improve this? I know there might be good explanation for it, I'm just asking. The usecase is creating my own export strings for some data in my mod, which can quickly get in the thousands of characters long.
Re: Improve performance for setting .text on textfields
Do you have some example mod i can use to test?
If you want to get ahold of me I'm almost always on Discord.
Re: Improve performance for setting .text on textfields
Sure, made one special for you. Lets you put in a character count and it inserts a string with that size into the textfield. Some more remarks in the code.
- Attachments
-
- textfieldtest.zip
- (2.24 KiB) Downloaded 83 times
Re: Improve performance for setting .text on textfields
I found a way to make it faster - at least for your specific example.
If you want to get ahold of me I'm almost always on Discord.
Re: Improve performance for setting .text on textfields
Great, thanks a lot!