Performance drop - many containers
Posted: Wed Dec 30, 2015 01:38
Hello there,
Since a time I fight with CEGUI to accomplish simple inventory system. D3D9 renderer is used, cegui 8.x.
It had to be draggable so I built initial part to be like that:
(A pseudo hierarchy diagram)
1. FrameWindow as the main holder
2. Another frame window with no toolbar to give more borders/look
3. Here, ScrollbarPane, as the idea is to simulate multicolumnlist with custom elements.
4. VerticalLayoutContainer as the child of scrollbarpane
This is the first part that don't change. The rows are added as children to verticallayoutcontainer in form:
1. OuterContainer = HorizontalLayoutContainer (as wrapper)
2. DragContainer, child of outercontainer
3. InnerContainer (horizontallayoutcontainer), child of dragcontainer
4. Static text, static text and button are children of InnerContainer
5. Finally the whole 'row' is added to verticallayoutcontainer from first part p.4
Think I wrote it ok, it worked ok, i could added row by row, scrollbar worked properly but... when I reach more than 50-100 records my rendering process starts to pop, on r9 280 hexa-core amd.
I used to test various containers/elements to accomplish this task and finally this one seemed to work without hand-positioning. Everything is layoutcontainer driven but scrollbarpane seems to reprocess all these elements instead of only visible ones, because the more I add the more drops I get.
Btw, I used to write my own gui and in new project I wanted to skip this point because of the 'wheel' idea, but with every step it seems to be inevitable:(
Thanks in advance.
Since a time I fight with CEGUI to accomplish simple inventory system. D3D9 renderer is used, cegui 8.x.
It had to be draggable so I built initial part to be like that:
(A pseudo hierarchy diagram)
1. FrameWindow as the main holder
2. Another frame window with no toolbar to give more borders/look
3. Here, ScrollbarPane, as the idea is to simulate multicolumnlist with custom elements.
4. VerticalLayoutContainer as the child of scrollbarpane
This is the first part that don't change. The rows are added as children to verticallayoutcontainer in form:
1. OuterContainer = HorizontalLayoutContainer (as wrapper)
2. DragContainer, child of outercontainer
3. InnerContainer (horizontallayoutcontainer), child of dragcontainer
4. Static text, static text and button are children of InnerContainer
5. Finally the whole 'row' is added to verticallayoutcontainer from first part p.4
Think I wrote it ok, it worked ok, i could added row by row, scrollbar worked properly but... when I reach more than 50-100 records my rendering process starts to pop, on r9 280 hexa-core amd.
I used to test various containers/elements to accomplish this task and finally this one seemed to work without hand-positioning. Everything is layoutcontainer driven but scrollbarpane seems to reprocess all these elements instead of only visible ones, because the more I add the more drops I get.
Btw, I used to write my own gui and in new project I wanted to skip this point because of the 'wheel' idea, but with every step it seems to be inevitable:(
Thanks in advance.