Comments (14)
Looks like scripts cannot be removed, at least not from chrome. That kind of sucks. Perhaps that's why memory increases? Still, the fact that "nodes" increase could be something to look into? Seems like as web apps become more massive it will become a necessity to unload scripts from memory.
from aura.
Did you try running the Chrome Profiler? See this screenshot: http://cl.ly/2d1G2z06142g1m1I2Z2d
This should give you the most accurate account of what's in memory. I'm curious what you'll find. I haven't tested this, but I hope the script are released from memory.
Edit: I just tested this by stopping/starting widgets in the Aura demo and the memory heap does seem to only grow:
http://cl.ly/1i1h0t3f2c25170z2w0q
from aura.
Yes, I ran the profiler and found the same thing you did - that memory grows. :( I'm guessing that this an issue with Chrome and not RequireJS or Aura - but, I'm not totally sure.
from aura.
@brihogan that's really weird. When we tested it we found that the memory decreased but this could be varying depending on a) version of chrome being used and b) whether there is something weird going on behind the scenes with RequireJS. We'll investigate. Thanks for reporting!
from aura.
Btw, I have version 19.0.1084.54. I will update and try again later.
from aura.
There are some interesting gotchas with the way the require.undef method works. In Aura's case I think one issue that came up was that whilst we're trying to handle widget unloading, we aren't manually unbinding event listeners and could be doing a better job of cleaning up DOM elements. We're going to look into this further to see what other improvements can be made.
from aura.
I'm experiencing the same memory issue on Chrome v20.0.1132.57. But what's more interesting. If I try to reload each widget 5+ times there are dragons :). For example... if I add the event to the calendar, same event is being added to the todo widget 4 or more times in a row.
from aura.
I'm considering the most elegant (non-verbose) way of solving this problem. If we were to extend our existing module unloading solution to also unbind all event handlers attached to a widget and it's children, would that be enough? Right now we're definitely not handling disposal of event handlers at all, so I'd like to nail down a solution to this.
from aura.
Note: There's definitely more we can do to (e.g static analysis to establish if there are other modules still using a dependency), but with the latest changes to the code I'm seeing memory drop when a widget is unloaded and increase when its reloaded (but not beyond the quantity of memory it was originally requiring).
Also, stopping and starting multiple times in a row is at the moment not resulting in any leaks/usage beyond what I would expect.
from aura.
@addyosmani it's good that we're at least breaking even. Before it just kept going up.
from aura.
I wonder if this is about Aura or more about backbone-aura the extension now.
Marionette EventBinder works with Backbone.Events and is mixed in with Backbone.Views to handle its garbage collection. #35's conversation handles this a bit.
Aura's backbone extension may have to cover views subscribing to stop
to totally clear events before they're nix'd.
Ultimately, the backbone extensions can't become deeper involved in garbage collection of DOM/events without the augmenting the vendor libs (backbones) default cleanup behavior. I'm going to flesh this out a bit more.
Maybe that commit mentioned by @ndersh in #35 will be a help :)
from aura.
@tony I think now that we've decoupled from Backbone Aura this is probably more about that extension. For it specifically I honestly wouldn't mind us using EventBinder (which Derick has released as a separate project since). Maybe if we have time we'll look at this post the V1 pre?
from aura.
Aura is currently being fully rewritten and this issue is going to be resolved as a part of the work we've recently landed in master.
from aura.
@oliger and I are currently working on it... We should have something in
master this week.
On 17 févr. 2013, at 17:22, Addy Osmani [email protected] wrote:
Aura is currently being fully rewritten and this issue is going to be
resolved as a part of the work we've recently landed in master.
—
Reply to this email directly or view it on
GitHubhttps://github.com//issues/34#issuecomment-13688324.
from aura.
Related Issues (20)
- Doubt about duplicate element and maintain the associated events HOT 3
- Framework design flawed! Removing dependencies jQuery and Underscore. HOT 12
- Requirejs repair Tons of issues. HOT 1
- Mediator dependency removal Event Emitter HOT 3
- Support for loading of individually optimized components? HOT 15
- Asynchronous/dynamic loading of components? HOT 3
- Does Aurajs compatible with IE6? If not, how should I do to make it support?
- Error when manually loading a component
- Data management HOT 4
- ideas or plans about aura's job in relation with polymerjs HOT 5
- Can't go past a Grunt Task referring component initialize
- hi guys did you abandon the aura project? HOT 2
- Access to parent(super) methods within component HOT 1
- how to Concatenate the files of the decoupled modules HOT 4
- External links not working with Android webview HOT 1
- [BUSINESS CRITICAL] aurajs.com - github pages site is inaccessible HOT 6
- How to use jQuery and Flot with AuraJS ?
- Lightening component built upon aura js
- The project's domain is advertising some pocker stuff :)
- Aura
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aura.