Tables: sharing splitter and sort buffers between tables, reducing memory footprints. (#3740)

+ GC pass on that data.
This commit is contained in:
ocornut
2021-05-07 18:29:50 +02:00
parent 32c453ae53
commit 4ce6bd8cff
4 changed files with 42 additions and 21 deletions

View File

@ -4060,6 +4060,9 @@ void ImGui::NewFrame()
for (int i = 0; i < g.TablesLastTimeActive.Size; i++)
if (g.TablesLastTimeActive[i] >= 0.0f && g.TablesLastTimeActive[i] < memory_compact_start_time)
TableGcCompactTransientBuffers(g.Tables.GetByIndex(i));
for (int i = 0; i < g.TablesTempDataStack.Size; i++)
if (g.TablesTempDataStack[i].LastTimeActive >= 0.0f && g.TablesTempDataStack[i].LastTimeActive < memory_compact_start_time)
TableGcCompactTransientBuffers(&g.TablesTempDataStack[i]);
if (g.GcCompactAll)
GcCompactTransientMiscBuffers();
g.GcCompactAll = false;