-
Notifications
You must be signed in to change notification settings - Fork 56
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
DeftJS 8.0-9.1Promise/Deferred Memory Usage #137
Comments
Hey Anthony, Are you seeing this consistently with all browsers, or one browser in -John
|
I'm currently finding it in Firefox 35.0.1 and Chrome 40.0.2214.111. IE also seems to slow but that is a bit harder to gauge accurately with lesser benchmarking tools in IE 9. |
Also, I am using Deft.Chain.sequence if that helps. Are promises executed using sequence completed and freed after the execution of the sequence, or after the promise of the sequence has done called? |
Hey Anthony, Hmm. The only internal references to those Promises are in callback I just did a quick test where I created 1,000,000 Promises and Could you elaborate a bit more about what you're doing when you see this It might be that you need to schedule your work in smaller chunks, with Stepping back a bit, I'm kind of curious - what sort of Best regards, -John
|
John, I'm using Deferreds and Promises to execute filtering and property calculations over a set of TreeModels ranging from 500 to 2000. I will say that some of these calculations can require a bit of searching. I'm using the Deft.Chain.sequence to execute the chain of promises in order since properties can be calculated based on the data from their parents. Currently the work is being divided into chunks of about 50 nodes and I do have the ability to adjust to smaller sets, which I can test. The number of promises should be between 2 to 8 per set of 50 nodes. You are correct that I wouldn't think that this number of promises would cause an issue. The only other thing that I might thing relevant would be that we are resolving or rejecting the deferred in a timeout. Below is a short example, this is to cause work to be continued without the browser alerting that the scripts have timed out: var deferred = Ext.create( 'Deft.promise.Deferred' ); setTimeout( function() {
//without a small break browsers might still find this processing quiet intense //return deferred.promise If you have more questions about my use case I would be happy to provide what I can. |
When using DeftJS 8.0 through 9.1 I'm seeing a significant amount of memory being used in the browser and not being released. I attempted to use done after the completion of my promises (in 9.0 and higher) but using DeftJS to create large numbers, in the thousands, and then performing them cause the application to stall. While my processor is exerted as I would expect, the memory usage climbs to about 800,000k before killing the site. Our application normally runs at about 100,000k to 180,000k. Is there any way to look into where Deft may be having problems?
The text was updated successfully, but these errors were encountered: