[IPython-dev] Interactive Matplotlib in the browser

Michael Droettboom mdroe at stsci.edu
Fri Oct 12 10:31:04 EDT 2012

On 10/12/2012 02:39 AM, Jason Grout wrote:
>> you make a single static plot of a large data set, that is way better
>> than trying to send the data to the browser and rendering it there.
>> But if you have to send hundreds or thousands of PNGs to get
>> interactivity, that benefit may be washed out.  Especially if you have
>> multiple users interacting with plots - the server could quickly grind
>> to a halt.  I think we should do tests to see how bad it gets, taking
>> into account the multiple user question.  The one performance benefit
>> that I can think of is that you can tune the level of interactivity to
>> limit the data that comes back.  For large data sets, users might be
>> willing to settle for less interactivity.  That option doesn't exist
>> when you send all the data back.
> I implemented server-side rate-limiting (see my most recent
> modifications at https://gist.github.com/3875846, for example).  Or are
> you saying that the server might not be able to render pngs for hundreds
> or thousands of users?  I wonder if we can get a better protocol than
> just a "Motion PNG" [1].
> A disappointing thing is that it seems to take about 100ms to render the
> example png image; it would sure be nice if that was a lot faster.

Yeah -- but solving that has nothing to do with the the browser.  I 
sense that's already quite close to optimal for what it's doing.

> [1] http://en.wikipedia.org/wiki/Motion_JPEG
I had ruled this out initially due to the lossy artifacts and the much 
larger encoding overhead.  But perhaps it could be provided as an 

I think Motion PNG makes sense locally, where bandwidth is high and CPU 
time is shared between the server and the client, and Motion JPEG might 
make more sense remotely.


More information about the IPython-dev mailing list