Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

If the Bokeh has many chart, output file is very heavy and system slow

Tags:

python

bokeh

I use the Bokeh. I like Bokeh very much, Because Bokeh have the many chart and output file is very simple

I work for Semiconductor Corporation, I sometimes analysis the semicon. data.

I have the many data and I make the many chart. may be 1000~4000 chart ops!!!!!

I use the Bokeh for making chart, but bokeh is very slow, I don't why ........

for example, data have 6000 rows, 250 columns (csv format), I want to plot about 250 columns

I use the matplotlib and numpy, source is like this about Bokeh

rect(hist_array[cnt, param_num, 0], \

hist_array[cnt, param_num, 1]/2.0, \
0.01 * (hist_array[cnt, param_num, 0][2] - hist_array[cnt, param_num, 0][1]), \
hist_array[cnt, param_num, 1], \
y_range=Range1d(start=0,end=param_array[param_num, 1][:file_count].max()*1.1), \
x_range=Range1d(start=param_array[param_num, 2][:file_count].min(), end=param_array[param_num, 3][:file_count].max()), \
plot_width=1200, plot_height=400, 
fill_color=colormap[cnt], \
line_color=colormap[cnt], \
#fill_alpha=0.1, \
#line_alpha=0.1, \
legend=file_name[4] + ' ' + tmpIndex[param_cnt])

I don't know why Bokeh is slow, may be 100 sec

like image 807
user3359094 Avatar asked Mar 05 '14 01:03

user3359094


1 Answers

Because Bokeh runs in the browser, there are ultimately still performance limits that come from the browser and the Javascript runtime. It sounds like you are plotting 1.5 million points? That will not work very well with the direct embedded mode.

However, there is a solution for this: the Bokeh server can automatically downsample your data, for some plot types, and serve up a simplified version into the browser. As the user then zooms and pans, more data will be retrieved from the server. This means that the output HTML files will be fast to start up, and also the performance should be very reasonable.

Currently, the downsampling server is not in the master/main branch of the repository, but is in a demo branch. In the next major version we will have this downsampling behavior baked into the main server itself. If you are interested in playing with the existing downsampling, please email the bokeh user list at [email protected], and we can pick up the conversation there.

like image 171
Peter Wang Avatar answered Oct 30 '22 12:10

Peter Wang