Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset selection can take a long time #44

Open
ItsPepperpot opened this issue Feb 19, 2024 · 2 comments
Open

Asset selection can take a long time #44

ItsPepperpot opened this issue Feb 19, 2024 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ItsPepperpot
Copy link
Collaborator

Sometimes selecting an asset in levels with many assets can take a long time (several seconds) before it appears selected with the gizmo + selection tint, especially in scenes with many objects.

To Reproduce

  1. Open a level with many objects (e.g. BB02.HIP/HOP)
  2. Click on an object to select it
  3. Observe it takes a long time to be selected
@ItsPepperpot ItsPepperpot self-assigned this Feb 19, 2024
@ItsPepperpot ItsPepperpot added the bug Something isn't working label Feb 19, 2024
@ItsPepperpot ItsPepperpot added this to the Next Release milestone Jun 22, 2024
@ItsPepperpot
Copy link
Collaborator Author

ArchiveEditor.SetSelectedIndices is causing asset selection to take a long time.
When you click in the 3D view, it will also change the selected layer on the layer combo box in the Archive Editor window.

This triggers the ArchiveEditor.comboBoxLayers_SelectedIndexChanged event - presumably causing every item in the Archive Editor asset list to be updated?

This takes about 800ms with BB02.hip and BB02.hop when selecting a Simple Object.

@ItsPepperpot
Copy link
Collaborator Author

It seems a large proportion of the time is spent here:

listViewAssets.Items.AddRange(items.ToArray());

adding the items to listViewAssets takes a long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant