Famous / famous-angular

Bring structure to your Famo.us apps with the power of AngularJS. Famo.us/Angular integrates seamlessly with existing Angular and Famo.us apps.
https://famo.us/angular
Mozilla Public License 2.0
1.92k stars 275 forks source link

Memory weirdness for a Scrollview #287

Closed stukennedy closed 9 years ago

stukennedy commented 9 years ago

I have 2 Scrollviews. They have no animation or special event handling ... they seem to be using a lot of memory.

Here is a screenshot of the Chrome timeline, you can see the memory ramping up and dropping down when nothing is happening on screen (i.e. no interaction at all) It's using between 130-140MB from the stack, which seems huge to me.

Any ideas?

famous_memory

zackbrown commented 9 years ago

It looks like it's only thrashing ~5MB of RAM, which doesn't strike me as too alarming. As for the baseline of 135MB, though, I agree that it seems pretty high (biggest practical consideration, really, is if you want to run it on iOS, given its draconian memory limits and fondness of crashing high-memory-using apps.) I just double-checked a very straight-forward multiple-scroll-view example (the docs page for scrollview: https://famo.us/integrations/angular/docs/unstable/api/directive/faScrollView/index.html ) and there's still less than 20MB of memory being consumed for the whole page with no alarming spikes.

To try isolating the problem, if you try just ng-repeating normal divs inside of a surface (instead of elements in a scrollview,) do you hit a similar amount of memory usage?

zackbrown commented 9 years ago

Closing for now (if library-allocated memory becomes an issue/bottleneck for you, Famous/famous would be a good place to reopen this issue)