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

[Core] Changes disposing items in CollectionView #10590

Closed
wants to merge 3 commits into from
Closed

Conversation

jsuarezruiz
Copy link
Contributor

@jsuarezruiz jsuarezruiz commented Oct 10, 2022

Description of Change

Changes (disconnecting and disposing Handlers) disposing items in Windows CollectionView.
Testing with a CollectionView having 1000 items scrolling up and down. This is the current behavior:

cv-perf-01-1
cv-perf-01-2

After the changes:
cv-perf-02-1
cv-perf-02-2
The memory consumption and the references count is much lower with the changes.

Forcing a GC.Collect doing scroll:
cv-perf-02-3
We can see how memory is constantly collected and in this case the memory does not increase.

Issues Fixed

Fixes #10560

@jsuarezruiz jsuarezruiz added t/bug Something isn't working legacy-area-perf Startup / Runtime performance area-controls-collectionview CollectionView, CarouselView, IndicatorView labels Oct 10, 2022
@jsuarezruiz jsuarezruiz marked this pull request as draft October 10, 2022 16:26
ve.Handler?.DisconnectHandler();

if (ve.Handler is IDisposable veHandlerDisposable)
veHandlerDisposable.Dispose();
Copy link
Member

Choose a reason for hiding this comment

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

If you remove all the dispose code does that still work?

I don't think we want to start pulling dispose patterns in the code here.

@jsuarezruiz jsuarezruiz marked this pull request as ready for review October 13, 2022 17:39
@jsuarezruiz jsuarezruiz changed the title [Windows] Changes disposing items in CollectionView [Core] Changes disposing items in CollectionView Oct 13, 2022
@jsuarezruiz jsuarezruiz marked this pull request as draft October 14, 2022 11:43
@jsuarezruiz
Copy link
Contributor Author

jsuarezruiz commented Nov 3, 2022

To help focus and move faster, we're going to have fewer open PRs and focus on the ones we'll be working on in each release. This PR require more work or event think in a better approach and for that reason is not included in the next release so I close it for now. I will reopen it and adapt to changes later.

@jsuarezruiz jsuarezruiz closed this Nov 3, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 17, 2023
@Eilon Eilon added t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.) and removed legacy-area-perf Startup / Runtime performance labels May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView t/bug Something isn't working t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Massive memory leak in CollectionView while scrolling
3 participants