Skip to content

High Heap allocation by GetHashCode #5

@HugoVG

Description

@HugoVG

in almost all RenderEditorGUI there is a memory with the ImGui.PushID($"{GetHashCode()}"); (coming from GetHashCode()) lines, it is allocting a ton on the SOH, sometimes even targeting LOH if it has a lot of smaller components(audio, childeren, text change, multiple textures).

image

image

Original post

Potential fixes:

  • let the component make an guid or random int so that is still identifiable by ImgUi. Gotta experiment a bit more to get something to work.

Another related bug:
When renaming an actor or changing something around, the dropdown closes, this can be an issue with GetHashCode since it makes a new hashcode - leading to ImgUi not knowing it should keep that open en rerendering it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceIssues related to performance

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions