Giter Club home page Giter Club logo

Comments (13)

github-actions avatar github-actions commented on August 25, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

from maui.

ajsuydam avatar ajsuydam commented on August 25, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

* [Memory Leak with CollectionView (#14993)](https://github.com/dotnet/maui/issues/14993),  similarity score: 0.80

* [Memory leak reloading list items on Windows (#18030)](https://github.com/dotnet/maui/issues/18030),  similarity score: 0.80

Closed similar issues:

* [Memory leaks EVERYWHERE (#12039)](https://github.com/dotnet/maui/issues/12039),  similarity score: 0.82

* [Massive memory leak in CollectionView while scrolling (#10560)](https://github.com/dotnet/maui/issues/10560),  similarity score: 0.81

* [ListView/CollectionView memory leak under Windows (#9162)](https://github.com/dotnet/maui/issues/9162),  similarity score: 0.81

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

While all of those are similar, unfortunately they do not cover my specific issue. They were good reads though and help me not feel so bad that I'm causing gigs of memory to leak. Seems like there's a lot of work to do.

In the mean time, another question is if there are any good alternatives to ListView. That is a potential work around.

from maui.

PureWeen avatar PureWeen commented on August 25, 2024

@ajsuydam Have you tried CollectionView?

from maui.

ajsuydam avatar ajsuydam commented on August 25, 2024

@PureWeen so that's weird, I just tried it, and the exact same code (just switching out ListView for Collection View) gives me a null reference exception. It's supposed to be a drop-in replacement right?

Scratch that. I figured that out.

from maui.

ajsuydam avatar ajsuydam commented on August 25, 2024

@PureWeen Ok can confirm the issue is not present with the CollectionView. Not sure why that is though....

from maui.

jonathanpeppers avatar jonathanpeppers commented on August 25, 2024

@ajsuydam do you see the same issue in a sample app with a ListView? Can you share a sample project?

In the nightly build, we should have fixed a problem for ListView on iOS, but not Windows:

from maui.

ajsuydam avatar ajsuydam commented on August 25, 2024

@ajsuydam do you see the same issue in a sample app with a ListView? Can you share a sample project?

In the nightly build, we should have fixed a problem for ListView on iOS, but not Windows:

* [[ios] fix leak in ListView *Cells #23143](https://github.com/dotnet/maui/pull/23143)

@jonathanpeppers I'll see if I have some spare time next week to come up with something, but it will be difficult, timeline here is pretty tight.

On a related note, are there any good resources you'd recommend for getting started with improving the memory performance of my app? I have tons of data to display, and the number of binding references looks set to increase exponentially. Need to figure out a way to analyze these heap snapshot reports, and then take action on them.

from maui.

ajsuydam avatar ajsuydam commented on August 25, 2024

Also just want to say thanks to both of you @jonathanpeppers @PureWeen for your quick responses on this. Confidence boost for sure.

from maui.

LeonSweden avatar LeonSweden commented on August 25, 2024

I did experience the very same where I had a ListView in a VerticalStackLayout.
The solution was a simple as change encapsulate of my ListView to be in a StackLayout.

The ListView has 1000+ elements and it loads fast w/o memory leaks. I've organized it in a TabbedPage where it started to leak memory after I switched tab from my list to something else and then back again. After changing to StackLayout, I've no memory leaks.

from maui.

MartyIX avatar MartyIX commented on August 25, 2024

On a related note, are there any good resources you'd recommend for getting started with improving the memory performance of my app?

https://learn.microsoft.com/en-us/dotnet/maui/deployment/performance?view=net-maui-8.0 is the best I know of

from maui.

ajsuydam avatar ajsuydam commented on August 25, 2024

On a related note, are there any good resources you'd recommend for getting started with improving the memory performance of my app?

https://learn.microsoft.com/en-us/dotnet/maui/deployment/performance?view=net-maui-8.0 is the best I know of

@MartyIX Thanks, I have referenced that already a bunch. I think maybe a better question that I should have asked is are there any good resources for how to use the .net memory analyzers and how to find the patterns in my programming that are resulting in the objects being kept alive.

from maui.

ajsuydam avatar ajsuydam commented on August 25, 2024

@jonathanpeppers @PureWeen For now I'm going to mark this as closed since the immediate issue has been resolved. But I would appreciate any resources y'all have!

from maui.

MartyIX avatar MartyIX commented on August 25, 2024

I think maybe a better question that I should have asked is are there any good resources for how to use the .net memory analyzers and how to find the patterns in my programming that are resulting in the objects being kept alive.

I would check fixes of memory leaks https://github.com/dotnet/maui/pulls?q=is%3Apr+label%3A%22memory-leak+%F0%9F%92%A6%22+is%3Aclosed In a way, it documents how memory leaks are diagnosed and then unit tested to prevent them from appearing again.

There is also https://github.com/dotnet/maui/wiki/Memory-Leaks (it should be up to date or mostly up to date AFAIK).

Other than that I'm not aware of any other sources.

from maui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.