KeenSoftwareHouse / SpaceEngineers

2.93k stars 896 forks source link

Fixing UI performance with long lists #546

Open Faark opened 8 years ago

Faark commented 8 years ago

Hey,

my station has ~1300 blocks with inventories, pulling my frame rate down to less than 5fps (according to steam, felt way worse!) when i open the inventory UI. The game seems to always send the entire UI to the GPU, even parts of the list that are outside of the scroll bars visible area. A quick hack (d92dea07a965bef626f8b376a900e0da95fa822e) fixed my frame rate and seems to work fine. But on a second look the actually visible area is specified in MyGuiControlList.Draw via MyGuiManager.UsingScissorRectangle(ref scissor) while my change would be in its base class MyGuiControlBase.Draw and uses an unrelated / arbitrary rectangle, so probably no chance of this getting merged. Does someone (unlike me with maybe at least some experience with SE's UI system) see a better way to achieve this?

Jimmacle commented 7 years ago

Nice find and thanks for not submitting it as a PR since you aren't sure if it's the best solution. Keen is planning to overhaul the GUI Soon :tm: so I'd just wait it out for now.