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

Optimized to increase UI performance #26

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

weitzhandler
Copy link

Hi @jamesmontemagno, I'd like to thank you for sharing the ORC here.
In my use case I have a large collection that changes upon user key strokes (meaning: it 5-10 times a second), and the ORC you shared was still a bit laggy, so I decided to optimize it and added some of the following features.
I'd really hope if you can accept my PR so other people can benefit.

  1. Add safe filters to skip unnecessary actions
  2. The RemoveRange action was throwing exceptions and caused UI issues when calling with NotifyCollectionChangedAction.Remove. I hence updated the RemoveRange to raise a separate remove event for each consecutive item cluster in the ORC, which dramatically improved the performance
  3. After a lot of experiments, my conclusion is clear, the key impact on UI performance of the ORC is resetting elements when not necessary. Reusing them however significantly boosts performance. Therefore, I updated the ReplaceRange to allow for reusing existing elements or at least retain their index and just updating the element, and only raise events (batched when possible - unfortunately, Raplace is not allowed for multiple items). More events costs way less performance than resetting items or not reusing them.

This was referenced Jul 28, 2017
@jamesmontemagno
Copy link
Owner

Are you able to fix these merge conflicts? I am looking to update the library

@KSemenenko
Copy link

any updates?

@weitzhandler
Copy link
Author

@jamesmontemagno Can you help me resolve the conflicts? I can't resolve them into this repo, but I checked the option "Allow edits from maintainers", is that of any help?

@KSemenenko
Copy link

@weitzhandler I think that you need to update your local repository from this remote one. fix conflicts and commit to the branch that goes to pull request.

@weitzhandler
Copy link
Author

I'll try that.

@jamesmontemagno
Copy link
Owner

Or the other thing is to create a new one lol, sometimes i just give up and start over when things get to whacky.

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.

3 participants