Giter VIP home page Giter VIP logo

Comments (15)

robinComa avatar robinComa commented on August 12, 2024

I also saw memory issue, i don't know where it is, I unmount the angular app and the route, so I think it is not in my hand... thanks for this analyse. We have to work on it as soon as possible in my project, I will be back to you if I find something.
I have to test it with angular 6, maybe something has changed to unmount apps.

from single-spa-angular-cli.

freon27 avatar freon27 commented on August 12, 2024

Oh did you not have the memory leak in previous Angular versions?

I was assuming it was maybe related to this which has been open over the last couple of releases of Angular:

angular/angular#13725

from single-spa-angular-cli.

freon27 avatar freon27 commented on August 12, 2024

Please do let me know if there's anything I can do to help - I have time to invest if it gets us able to use Single-SPA :)

from single-spa-angular-cli.

robinComa avatar robinComa commented on August 12, 2024

Ok thanks!
Do you want the permission to push on single spa angular cli to test something?

from single-spa-angular-cli.

freon27 avatar freon27 commented on August 12, 2024

I guess for now I can just clone it and build locally right? Is there anything tricky about build process?

from single-spa-angular-cli.

robinComa avatar robinComa commented on August 12, 2024

nope, only a npm link

from single-spa-angular-cli.

freon27 avatar freon27 commented on August 12, 2024

I have to admit I'm a little lost for ideas right now. I've been poking around in the Angular source and it feels like you're doing all the right things. The only other thing I can think of is calling destroy on the platform itself which according to a comment in the source code should Destroy the Angular platform and all Angular applications on the page which sounds like it might be a possibility.

I'm not 100% sure how to do that within Single SPA lifecycle though and I guess it probably doesn't work for you (we currently have a limit to one active Angular app at a time because it seems to cause more trouble than it's worth to have them running in parallel).

from single-spa-angular-cli.

pevans360 avatar pevans360 commented on August 12, 2024

Not sure if it's relevant, but came across the following code when researching another issue (note the comment - "Ensure Angular destroys itself on hot reloads.") :

platformBrowserDynamic().bootstrapModule(AppModule).then(ref => {
  // Ensure Angular destroys itself on hot reloads.
  if (window['ngRef']) {
    window['ngRef'].destroy();
  }
  window['ngRef'] = ref;

  // Otherwise, log the boot error
}).catch(err => console.error(err));

At this link: [(https://stackblitz.com/edit/angular-x32any?file=src%2Fmain.ts)]
Which was referenced here: [https://stackoverflow.com/questions/43991306/angular-4-5-6-global-variables/43991457#43991457]

from single-spa-angular-cli.

freon27 avatar freon27 commented on August 12, 2024

Thanks for the tip.

Maybe @robinComa will have more luck with this but I've not been able to make it work (not seen any memory reduction).

Also, I suspect that for this module it won't be acceptable because that must destroy the whole of angular on the page, right? And people might be running multiple Angular apps simultaneously.

from single-spa-angular-cli.

robinComa avatar robinComa commented on August 12, 2024

Thanks @pevans360 !
If you want, you can try to add it on single spa anuglar cli?
Could you try to do a PR?

Bye guys

from single-spa-angular-cli.

pevans360 avatar pevans360 commented on August 12, 2024

@robinComa - Happened across this thread while researching a different angular memory issue. Haven't used this project (and just had to look up what a PR is). Was just trying to help out ... don't think this is the right spot for my 1st PR.

from single-spa-angular-cli.

robinComa avatar robinComa commented on August 12, 2024

@pevans360 no problem, I understand
Thank you for your comment!

from single-spa-angular-cli.

joeldenning avatar joeldenning commented on August 12, 2024

This project is deprecated (see #36). Use single-spa-angular@3, instead.

from single-spa-angular-cli.

hugocruz11 avatar hugocruz11 commented on August 12, 2024

@freon27 any solution for this, I have the same problem, please could you tell me how you solved it

from single-spa-angular-cli.

freon27 avatar freon27 commented on August 12, 2024

We didn't end up going with single SPA at the time due to this problem.

However my understanding is that Single SPA has changed a lot since then and I know other teams in our company have started using it, apparently without problems.

from single-spa-angular-cli.

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.