Skip to content

[refactor]: Optimize folder tree child name lookup in AssetManagerWindow #388

Description

@coderabbitai

Objective:
Optimize the inefficient O(n) lookup for child folder names in the AssetManagerWindow folder tree rendering to improve performance.

Acceptance Criteria:

  • Modify the m_folderChildren data structure to store child names directly or implement a separate name lookup structure
  • Update the drawFolderTreeItem method to retrieve child names without iterating through m_folderStructure
  • Ensure the optimization maintains the same functionality and UI behavior
  • Verify performance improvement through testing

Dependencies:
None

Technical Details:

Environment:

  • Component: Editor
  • File: editor/src/DocumentWindows/AssetManager/FolderTree.cpp (lines 62-73)

Components:

  • AssetManagerWindow class
  • Folder tree rendering system

Resources:

  • Current implementation uses nested loop causing O(n) complexity for each child name lookup
  • Suggested solution: Store FolderChild struct with path and name in m_folderChildren map

Type: Refactor

Backlinks:

Requested by: @iMeaNz

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions