Skip to content

Performance improvements#745

Open
justinswork wants to merge 4 commits intodotnet:masterfrom
justinswork:perf-improvements
Open

Performance improvements#745
justinswork wants to merge 4 commits intodotnet:masterfrom
justinswork:perf-improvements

Conversation

@justinswork
Copy link
Copy Markdown
Contributor

Had to dig in and see if there was any low-hanging fruit that could dramatically improve performance, as it seems to be quite slow when loading hundreds of RESX files.

…iew on every access

This is safe to cache because the underlying ResourceTableEntries collection is only assigned once in the constructor and never replaced.
ListCollectionView wraps it by reference and stays in sync via INotifyCollectionChanged as items change.
Comment thread src/ResXManager.View/Visuals/ResourceViewModel.cs Outdated
Comment thread src/ResXManager.Model/ResourceEntity.cs Outdated
Comment thread src/ResXManager.Model/ProjectFile.cs Outdated
public bool IsLoading { get; private set; }

// Do not use CollectionViewSource in XAML, has huge performance impact when there are many items in the list.
public CollectionView GroupedResourceTableEntries
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This property is only used by binding, and no one ever raises a property change event for this, so it is accessed only once, so this "optimization" has absolutely no effect

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants