GithubHelp home page GithubHelp logo

Comments (3)

ijlee2 avatar ijlee2 commented on June 11, 2024

Hi, @johanrd. Thanks for posting recordings to show some of the steps that you had taken. From the videos, though, I didn't understand what I'm supposed to look at, which suggests that there is a memory leak. Can you describe this to me?

Secondly, I found the commit history hard to follow. Can you recreate the history so that each commit (each step) clearly indicates what's particular about that step?

At the moment, I have to doubt that ember-intl is the issue, because your reproduction repo includes a few other variables, such as ember-truth-helpers (in whose repo you had raised a similar issue), ember-resources, ember-template-imports (for *.gts), ember-route-template, and chart.js.

/* package.json */
{
  "dependencies": {
    "@ember/render-modifiers": "^2.1.0",
    "chart.js": "^4.4.2",
    "ember-intl": "^6.5.1",
    "ember-resources": "^7.0.0",
    "ember-route-template": "^1.0.3",
    "ember-truth-helpers": "^4.0.3",
    "reactiveweb": "^1.2.2"
  }
}

If you can write a reproduction app with the minimum necessary dependencies (don't include addons that are relatively unstable), I think it will help with your investigation more.

from ember-intl.

johanrd avatar johanrd commented on June 11, 2024

@ijlee2 Hi. Thanks for the quick reply. Yes, the commit history is a mess – memory leaks are a mess.

Don't follow the commit history. Please follow my steps to reproduce

  1. Clone https://github.com/johanrd/ember-memory-leak
  2. Check out the ember-intl branch
  3. Run pnpm start
  4. Click on the "about' link.
  5. Take a heap snapshot.
  6. Search for "ChartJs". See that there are no such component in memory.
  7. Visit the "dashboard" page and go back to "about" N times.
  8. Take a new snapshot. See that the ChartJS component is retained in memory for each visit to dashboard, i.e. N times
Screenshot_2024-03-08_at_13_31_47
  1. Downgrade to ember-intl v6.2.2.
  2. Repeat steps 1-7 and see that ChartJS component is successfully released from memory every time you exit the dashboard route.

Here, the only difference is the downgrade of ember-intl from v.6.3.0 to v6.2.2. One has a memory leak. The other does not. I can try to create an even more miniomal steps to reproduce (hence, the messy commit history), but at least there are steps to reproduce.

from ember-intl.

johanrd avatar johanrd commented on June 11, 2024

Update: I have now stripped it down to a minimal reproducible example here: https://github.com/johanrd/ember-intl-memoy-leak-reproduction
Screenshot 2024-03-08 at 14 02 03

Just search for LeakyIntlConsumingComponent in the heap memory, and it should be evident that the component (which is only consuming the t-helper) is not released from memory when it is destroyed.

Downgrade to ember-intl v6.2.2 and the memory leak is gone

from ember-intl.

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.