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

fa-container-surface - performance issue - Chrome desktop #198

Closed zoneblaze closed 10 years ago

zoneblaze commented 10 years ago

I am working on a set up where I need over 12 containers cells on a scalable grid in order to mask their contents. I noticed Chrome desktop is seriously struggling rendering those, some of the container views even randomly disappear, whilst IE, Firefox and Safari seem to make light work out of those. Is this a known performance issue with Chrome desktop and Famo.us?

zackbrown commented 10 years ago

ContainerSurfaces are known to be significantly less performant than normal Surfaces because each ContainerSurface creates an additional Famo.us Context, which comes with some overhead.

That said, 12 Contexts shouldn't come with that much of a slowdown, and I haven't seen this sort of performance issue before. Have you tried profiling to see where the slowdown is happening? Do you have any shareable code that can reproduce this?

zoneblaze commented 10 years ago

Sorry didn't keep the code, I moved forward and thought about some of the animations so I can cut down on masking. Basically I had 3 levels of nested surface-containers, so was actually far more than 12. 3x3 grid cells containing several containers each. Now I am down to 18 containers total and seems to work fine, but I haven't done any animations yet within my new context. If I hit a performance wall again I'll keep you posted with actual examples! ; )

zackbrown commented 10 years ago

Alright, I'll go ahead and close this out then — don't hesitate to open it again if you run into a similar issue.