Skip to content

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

@coderabbitai

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions