LCD Performance
Quick introduction: A while ago we noticed our server sim going low very quickly, now after deleting a bunch of monospace lcds (like 10) and profiling again we noticed we agained back about a full millisecond of performance. So i decided to look into this issue a bit more.
When looking through code i noticed that UpdateAfterSimulation10 in MyTextpanel always does a .ToString() on the PublicDescription (All the text in the pb) so when people use monospace lcds with 30000+ characters it does this operation *every 10 ticks*. As you can imagine this is quite slow but i wanted to be sure so i profiled it first to confirm my suspicion.
Now how do we fix this; after discussing this with a couple of other community members, namely Malware and Digi we came to the conclusion that the current .Net implementation of StringBuilder no longer suits this task and that the best way to fix this massive performance issue would be to create a custom class that works like stringbuilder worked in earlier .Net versions.
The fact that StringBuilder isn’t suited for how they’re using it anymore. It probably was when the engine was started, but it was changed in one of the .NET versions, I forget which – and is no longer suitable. They should replace it with a custom class that works the way StringBuilder worked before. Like List. – Malware 3/5/2019
I hope this issue will get adressed pretty soon as its honestly quite a big performance drain on any server. All of this applies to both MyTextPanel and MyTextSurface ofcourse.
(link back to this issue on my blog with profiler screenshot https://hamsterempire.nl/2019/05/03/lcd-performance/)
Hello, Engineer!
Thank you for your feedback! Your topic has been added between considered issues.
Please keep voting for the issue as it will help us to identify the most serious bugs.
We really appreciate your patience.
Kind Regards
Keen Software House: QA Department
Hello, Engineer!
Thank you for your feedback! Your topic has been added between considered issues.
Please keep voting for the issue as it will help us to identify the most serious bugs.
We really appreciate your patience.
Kind Regards
Keen Software House: QA Department
So is this why some LCD scripts have been so laggy lately? I noticed with the fleet command script the LCD UI was smooth as silk, and suddenly an update came out, and now it's horrendusly laggy.
So is this why some LCD scripts have been so laggy lately? I noticed with the fleet command script the LCD UI was smooth as silk, and suddenly an update came out, and now it's horrendusly laggy.
Just posted this one: https://support.keenswh.com/spaceengineers/general/topic/1-191-108-performance-bug-with-lcds-unnecessary-updates
I think it may be the same issue.
(This website only lists the first page of search results for me in Edge, so I sometimes miss existing reports, sorry.)
Just posted this one: https://support.keenswh.com/spaceengineers/general/topic/1-191-108-performance-bug-with-lcds-unnecessary-updates
I think it may be the same issue.
(This website only lists the first page of search results for me in Edge, so I sometimes miss existing reports, sorry.)
Hi guys,
LCD Performance was tweaked. It should be fine now. Please test it and let us know.
Thanks :)
Hi guys,
LCD Performance was tweaked. It should be fine now. Please test it and let us know.
Thanks :)
Replies have been locked on this page!