I have recently experienced a performance issue trying to update several small image plots at interactive frame rates. I would like to achieve around 10 frames per second running the server in localhost, but I can’t get more than 3-4. I’m opening this thread here since I didn’t get any reply to my question in stackoverflow:
In my application, I have a gridplot with 4x4 image plots of 64x64 elements and the data changes continuously according to some user interaction. I update the ColumnDataSources of the plot by replacing the data dict with a new one, doing something like this:
def update():
…
for row in grid:
for col in row:
…
new_data = {‘image’: new_image}
sources[row + “_” + col].data = new_data
``
I’ve posted a minimal working example in the SO post, simulating the user interaction with a periodic callback and I get a consistent time of ~300ms per frame, no matter what. Is this the expected performance or am I doing something wrong?
If my code is ok, I suspect the JSON encoding/decoding is the cause. I’m also aware of the ongoing discussion about improving the image plot sync performance by using base64 encoding:
and I would like to know if there is any realistic plan to use the base64 encoding in master soon. Actually, if some changes are needed in the synchronization mechanism to use base64 encoding for image plots, why not to leverage this opportunity and use base64 for any numeric column in a ColumnDataDource? I guess that if the columns are sent individually as 1d arrays, just using a base64 encoding could improve the performance without too many additional changes.
As it happens, as of this week the binary encoding is now actively being worked on by someone who has up to half-time to devote to it. It's certainly possible unforeseen problems or difficulties will crop up, but I think we have a handle on most issues. I'm hopeful it can be ready for 0.12.4 which is very currently only casually scheduled for "in a few weeks" / "before the holidays".
I have recently experienced a performance issue trying to update several small image plots at interactive frame rates. I would like to achieve around 10 frames per second running the server in localhost, but I can't get more than 3-4. I'm opening this thread here since I didn't get any reply to my question in stackoverflow:
In my application, I have a gridplot with 4x4 image plots of 64x64 elements and the data changes continuously according to some user interaction. I update the ColumnDataSources of the plot by replacing the data dict with a new one, doing something like this:
def update():
...
for row in grid:
for col in row:
...
new_data = {'image': new_image}
sources[row + "_" + col].data = new_data
I've posted a minimal working example in the SO post, simulating the user interaction with a periodic callback and I get a consistent time of ~300ms per frame, no matter what. Is this the expected performance or am I doing something wrong?
If my code is ok, I suspect the JSON encoding/decoding is the cause. I'm also aware of the ongoing discussion about improving the image plot sync performance by using base64 encoding:
and I would like to know if there is any realistic plan to use the base64 encoding in master soon. Actually, if some changes are needed in the synchronization mechanism to use base64 encoding for image plots, why not to leverage this opportunity and use base64 for any numeric column in a ColumnDataDource? I guess that if the columns are sent individually as 1d arrays, just using a base64 encoding could improve the performance without too many additional changes.
Thank you for your quick answer and the great news, Bryan. I’m looking forward for 0.12.4 then.
Enrique
···
El viernes, 2 de diciembre de 2016, 16:11:54 (UTC+1), Bryan Van de ven escribió:
As it happens, as of this week the binary encoding is now actively being worked on by someone who has up to half-time to devote to it. It’s certainly possible unforeseen problems or difficulties will crop up, but I think we have a handle on most issues. I’m hopeful it can be ready for 0.12.4 which is very currently only casually scheduled for “in a few weeks” / “before the holidays”.
I have recently experienced a performance issue trying to update several small image plots at interactive frame rates. I would like to achieve around 10 frames per second running the server in localhost, but I can’t get more than 3-4. I’m opening this thread here since I didn’t get any reply to my question in stackoverflow:
In my application, I have a gridplot with 4x4 image plots of 64x64 elements and the data changes continuously according to some user interaction. I update the ColumnDataSources of the plot by replacing the data dict with a new one, doing something like this:
def update():
…
for row in grid:
for col in row:
...
new_data = {'image': new_image}
sources[row + "_" + col].data = new_data
I’ve posted a minimal working example in the SO post, simulating the user interaction with a periodic callback and I get a consistent time of ~300ms per frame, no matter what. Is this the expected performance or am I doing something wrong?
If my code is ok, I suspect the JSON encoding/decoding is the cause. I’m also aware of the ongoing discussion about improving the image plot sync performance by using base64 encoding:
and I would like to know if there is any realistic plan to use the base64 encoding in master soon. Actually, if some changes are needed in the synchronization mechanism to use base64 encoding for image plots, why not to leverage this opportunity and use base64 for any numeric column in a ColumnDataDource? I guess that if the columns are sent individually as 1d arrays, just using a base64 encoding could improve the performance without too many additional changes.
Thanks,
Enrique
Bokeh version: 0.12.3
Python version: 2.7.12
OS: Mac OSX 10.11.6 (El Capitan)
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].