Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Memory increases #8483

Closed
ask4kapil opened this issue Aug 5, 2014 · 15 comments
Closed

Memory increases #8483

ask4kapil opened this issue Aug 5, 2014 · 15 comments

Comments

@ask4kapil
Copy link

Hi I am using the angularjs app and I have questions regarding the memory management and routing.

I had tested this senario, one app with pure angular js and it has two routes, so when I nevigate between these two routes for 20 times then browser memory increased by 150 MB.

what is reson for this? Is there any setting though which I can controll this?

@Narretz
Copy link
Contributor

Narretz commented Aug 5, 2014

This sounds like a bug. Can you please provide a minimal example that we can run locally or in a plnkr that shows the problem? Also, what browsers are you using? Do you see the memory increase in the browser dev tools or in the task manager (equiv).
There are also these topics, which describes a similar problem, maybe this is the same: #8061 #3543

@ask4kapil
Copy link
Author

Seems to the Issue with jquery only... let you know once I will test with jquery 1.9 version

@Narretz
Copy link
Contributor

Narretz commented Aug 5, 2014

For angular 1.2, only jquery < 2.x is supported. On master, starting with the next beta we will support only jquery >= 2.0.

@ask4kapil
Copy link
Author

Hi Narretz,

The app which I had created seems to be very big, so I can not have the plnkr example but sure I can give you the elements which I had used in this mostly.
Elements are

  • Nested ng-repeat on views
  • grids
  • tabs

I am seeing the memory increase in the chrome task manager, and with jquery 1.9 its improved with 20 routing now memory increase from 37 mb to 100 mb.

Location of memory heap dump from chrome developer tools
https://drive.google.com/a/bits-pilani.ac.in/file/d/0B7-Tcw9R95cYRVo4TTNwREZRQ3M/edit?usp=sharing

@zachsnow
Copy link
Contributor

zachsnow commented Aug 6, 2014

We upgraded a largish AngularJS application (25k lines of Javascript not including libraries, 20k lines of templates) from 1.3.0-beta.6 to 1.3.0-beta.17 and saw a tremendous increase in memory, with memory apparently not being reclaimed properly (usage grew and grew). Of course, I haven't come close to developing an simple example demonstrating the issue; just wanted to say that there does seem to be something afoot.

Not sure if @kapilkumawatca is running 1.2 or the 1.3.0 beta though.

@IgorMinar IgorMinar modified the milestones: Purgatory, 1.3.0 Aug 21, 2014
@alexandr2110pro
Copy link

Hi, i've got the memory leak too. I'm using ui-router and after 20+ state changes, memory significantly increases.
We don't use jquery.

@IgorMinar
Copy link
Contributor

it would be good to get more info about this. none of our current memory leak detection tests fail, so it's not clear to me what the problem could be.

@IgorMinar IgorMinar modified the milestones: 1.3.0-rc.1, 1.3.0 Aug 30, 2014
@IgorMinar
Copy link
Contributor

@tbosch we should investigate this

@tbosch
Copy link
Contributor

tbosch commented Sep 2, 2014

@alexandr2110pro @zachsnow @kapilkumawatca We really need a live example that reproduces the problem, including exact browser version. Could you try to create one that shows the problem? Could also be a live site, ...

@jeffbcross jeffbcross modified the milestones: 1.3.0-rc.1, 1.3.0-rc.2 Sep 9, 2014
@jeffbcross
Copy link
Contributor

Moving this to purgatory until we have better reproduction.

@jeffbcross jeffbcross modified the milestones: Purgatory, 1.3.0-rc.2 Sep 9, 2014
@IgorMinar
Copy link
Contributor

we should at least verify that a common scenario (router with a repeater)
doesn't leak before moving this to purgatory

On Tue, Sep 9, 2014 at 7:31 PM, Jeff Cross [email protected] wrote:

Moving this to purgatory until we have better reproduction.


Reply to this email directly or view it on GitHub
#8483 (comment).

@jeffbcross jeffbcross modified the milestones: 1.3.0-rc.2, Purgatory Sep 9, 2014
@jeffbcross jeffbcross self-assigned this Sep 9, 2014
@jeffbcross
Copy link
Contributor

I'll make a plunker and take a look

@jeffbcross
Copy link
Contributor

I created a plnkr with two views that contain nested repeaters with 1000 rows and 20 columns, as well as one mostly empty view. I recorded the timeline (attached) and clicked through all three views about 20 times (see orange marks at top of timeline created via console.timeStamp()). We could not reproduce the problem so far. If anyone wants to fork this plnkr and make it reproduce the error, that would help us identify any issues.

http://plnkr.co/edit/FUJzRJhYYrSBY9n2QiCn?p=preview

screen shot 2014-09-10 at 12 39 39 pm

@jeffbcross jeffbcross modified the milestones: Purgatory, 1.3.0-rc.2 Sep 15, 2014
@jeffbcross
Copy link
Contributor

Per some discussion with @tbosch we decided to move this to purgatory until more concrete information is provided.

@jeffbcross jeffbcross removed their assignment Sep 15, 2014
@IgorMinar
Copy link
Contributor

I'm closing this as a dupe of #9095 which seems similar to the original report and is a confirmed leak.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants