agilescientific / modelr-app

Modelr front end
Apache License 2.0
0 stars 1 forks source link

1D model profiling #162

Closed ben-bougher closed 9 years ago

ben-bougher commented 9 years ago

The latency is starting to be a bit of factor. We should figure out where the bottle neck is and see if we can do anything about it.

Backend: Test and time the log/synthetic generation. JSON: Get a feel for the size of our payload and how long it takes to send. May be worth downsampling some of the data PLOTTING/D3: We may be redrawing more elements than necessary and might be slowing things down.

We are ~.3-.5 s for each interaction, which is a bit laggy for it to truly feel interactive.

ben-bougher commented 9 years ago

Quickly fooling around: The backend processing is about .08s, sending data to the front end adds about .1 s, so the major delay is the d3 re-rendering.

kwinkunks commented 9 years ago

Anything in here help?? https://blog.safaribooksonline.com/2014/02/20/speeding-d3-js-checklist/

ben-bougher commented 9 years ago

I will check it out.

The biggest criminal right now is the wiggle plot, mostly because we are making it in a super hacky way. Each trace we draw a wiggle that is filled in, put on a rectangle, then draw a wiggle over top of the rectangle.

A better way to do a wiggle fills would cut a lot of the lag.

ben-bougher commented 9 years ago

I moved some of the loops out of JS and do them by stacking numpy arrays. I turned off the filled wiggles for the time being just to do some speed testing.

If it is laggy now it will be even worse once we do the gradient and intercept stuff

ben-bougher commented 9 years ago

Wow, okay so running firebug was really slowing it down for me. Seems to be actually by pretty quick. I think the users internet connection is the limiting factor now, which is out of our hands.