Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Performance - Complex views #557

Closed
g00fy- opened this Issue Apr 3, 2013 · 15 comments

Comments

Projects
None yet
5 participants

g00fy- commented Apr 3, 2013

Are there any performance benchmarks for Marionette?
I found that complex views render time is often much greater than 100-200ms (view consisting of ~50 views).
Just curious if I am doing something wrong or, that's the way it has to be.

I haven't noticed complex views being slow to render. I have an area where I've got a CollectionView with many CompositeViews with many ItemViews. I can easily have > 100 views in the stack. Render times for me are very good (don't have any exact numbers). Can you give more info on your specific setup?

g00fy- commented Apr 3, 2013

I will try to make a jsfiddle to show what I mean. I also noticed, that
simple CompositeView, with more than 50 elements takes longer than 100 ms
to render. Maybe this is caused by the fact that my itemView is actually a
Marionette.Layout ?

2013/4/3 Stafford Brunk notifications@github.com

I haven't noticed complex views being slow to render. I have an area where
I've got a CollectionView with many CompositeViews with many ItemViews. I
can easily have > 100 views in the stack. Render times for me are very good
(don't have any exact numbers). Can you give more info on your specific
setup?


Reply to this email directly or view it on GitHubhttps://github.com/marionettejs/backbone.marionette/issues/557#issuecomment-15835717
.

Pozdrawiam

g00fy- commented Apr 3, 2013

this isn't a complex view but it still does take a while to render:
http://fiddle.jshell.net/g00fy/HZsmn/show/
Once we start to introduce some more complex views (like Layout instead of ItemView) the rendering time increases even more.

What are you seeing for the mean render time in there? I'm getting around 43 milliseconds in Chrome and 47 milliseconds in Firefox.

g00fy- commented Apr 3, 2013

I updated the fiddle,
~150 ms

2013/4/3 Stafford Brunk notifications@github.com

What are you seeing for the mean render time in there? I'm getting around
43 milliseconds in Chrome and 47 milliseconds in Firefox.


Reply to this email directly or view it on GitHubhttps://github.com/marionettejs/backbone.marionette/issues/557#issuecomment-15860412
.

Pozdrawiam

g00fy- commented Apr 3, 2013

firefox almost hangs (asks to interrupt the script) mean ~ 250 ms (nightly / aurora)

I'm now seeing ~60ms in Chrome and ~65ms in Firefox.

g00fy- commented Apr 3, 2013

do you have some kind of super-computer ? I have tested this on 3 different machines, same or even worse results. Can any one else check this out?

LOL no it's just a late 2011 Macbook Pro.

Also FWIW, I realized I was running Firefox 19 so I updated to 20 and I'm seeing render times around 61ms pretty consistently.

I am getting 150.6 ms on an iPhone 5 in Safari and 170.37 ms in Chrome for iOS (which makes sense given Chrome can't use Nitro). I don't know what to tell you. Perhaps @derickbailey can shed some insight?

Member

jsoverson commented Apr 3, 2013

Seeing 59 and 64 ms on chrome/firefox, respectively, on a 1-2 year old Macbook Pro.

There are also a lot of things being tested in that fiddle (events, event triggering, view instantiation, view rendering, dom rendering, etc). It's a real-life use case, sure, but a lot of variables are at play.

Marionette has some performance numbers that you can run yourself in the spec/performance/ directory.

Contributor

existentialism commented Apr 3, 2013

I'm seeing about the same as @jsoverson on a 2013 Retina MacBook Pro.

Not a weak machine, but wanted to give another data point!

g00fy- commented Apr 3, 2013

When I changed the power consumption level to high performance I had the same results like you guys. (I could not believe this was slowing down things 100%)

Still it would be nice to know what kind of numbers should we expect from Marionette, so we can figure it out when we screw something up :).

I am gonna definitely look in to the performance directory. Thanks @jsoverson

@g00fy- g00fy- closed this Apr 3, 2013

Owner

derickbailey commented Apr 3, 2013

the files in the spec/perf folder are out of date, and may not work anymore. i've been wanting to write real perf specs for a long time, but have never had an opportunity. if someone wanted to contribute some good specs using benchmark.js, though... :D

g00fy- commented Apr 3, 2013

Is there any way to find out what is taking the most time? I guess it is not templates, so what then?

Owner

derickbailey commented Apr 3, 2013

chrome dev tools, or firebug. they both have profilers built in to them and will show you performance measurements of executing code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment