Slow BOKEH rendering

I have tried webgl in Stacked Bar Chart but Not much improvement.
I have a csv file. Analytics is done in pandas and visualisation is done using Bokeh.

Is there any other way to fast up rendering?

Rendering takes like 5-6 seconds in the Python CLI but when I give the show command, it takes like a minute to show up the visualisation.

Without code to inspect or run it is impossible to speculate about what might be going on. Can you provide a complete, minimal, run-able test script to reproduce what you are seeing?

Bryan

···

On Jul 26, 2016, at 04:59, Pragyan Bezbaruah [email protected] wrote:

I have tried webgl in Stacked Bar Chart but Not much improvement.
I have a csv file. Analytics is done in pandas and visualisation is done using Bokeh.

Is there any other way to fast up rendering?

Rendering takes like 5-6 seconds in the Python CLI but when I give the show command, it takes like a minute to show up the visualisation.

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].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/14c55cb7-993a-4f7c-a831-1ffe03397799%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Here is the code-

import pandas as pd
import seaborn as sns
import pandas as pd
from bokeh.charts import Bar, output_file, show
from bokeh.charts.attributes import cat, color
from bokeh.charts.operations import blend
from bokeh.charts.utils import df_from_json
from bokeh.charts import Bar, output_file, show

df = pd.read_csv("/home/pragyan/Documents/Pandas-Table/samplereqd-test2.csv")

df = pd.DataFrame(df)

p = Bar(df, values=blend(‘M1’,‘M2’,‘M3’,‘M4’,‘P1’,‘P2’,‘P3’,‘P4’,
name=‘Severity Count’, labels_name=‘severity’),
label=cat(columns=‘Code’,
sort=False), stack=cat(columns=‘severity’),
legend=‘top_right’, title=‘Check if any Particular Code leads to a specific severity’, plot_width=1100,
plot_height=600, tools=“wheel_zoom,pan,reset,resize,save”,
color=[’#87CEFA’,’#9BC4E2’,’#6CA6CD’,’#325C74’,’#EE7942’,’#CD6839’,’#8A360F’,’#5C4033’], webgl=True)

output_file("/home/pragyan/Documents/test2.html")
show§

The code runs well. No error. Runs as expected. But slow. Can anything be done?

···

On Tuesday, July 26, 2016 at 4:32:42 PM UTC+5:30, Bryan Van de ven wrote:

Without code to inspect or run it is impossible to speculate about what might be going on. Can you provide a complete, minimal, run-able test script to reproduce what you are seeing?

Bryan

On Jul 26, 2016, at 04:59, Pragyan Bezbaruah [email protected] wrote:

I have tried webgl in Stacked Bar Chart but Not much improvement.
I have a csv file. Analytics is done in pandas and visualisation is done using Bokeh.

Is there any other way to fast up rendering?

Rendering takes like 5-6 seconds in the Python CLI but when I give the show command, it takes like a minute to show up the visualisation.

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].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/14c55cb7-993a-4f7c-a831-1ffe03397799%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

How big is the csv?

···

On Jul 26, 2016, at 06:47, Pragyan Bezbaruah [email protected] wrote:

Here is the code-

import pandas as pd
import seaborn as sns
import pandas as pd
from bokeh.charts import Bar, output_file, show
from bokeh.charts.attributes import cat, color
from bokeh.charts.operations import blend
from bokeh.charts.utils import df_from_json
from bokeh.charts import Bar, output_file, show

df = pd.read_csv("/home/pragyan/Documents/Pandas-Table/samplereqd-test2.csv")

df = pd.DataFrame(df)

p = Bar(df, values=blend(‘M1’,‘M2’,‘M3’,‘M4’,‘P1’,‘P2’,‘P3’,‘P4’,
name=‘Severity Count’, labels_name=‘severity’),
label=cat(columns=‘Code’,
sort=False), stack=cat(columns=‘severity’),
legend=‘top_right’, title=‘Check if any Particular Code leads to a specific severity’, plot_width=1100,
plot_height=600, tools=“wheel_zoom,pan,reset,resize,save”,
color=[’#87CEFA’,’#9BC4E2’,’#6CA6CD’,’#325C74’,’#EE7942’,’#CD6839’,’#8A360F’,’#5C4033’], webgl=True)

output_file("/home/pragyan/Documents/test2.html")
show§

The code runs well. No error. Runs as expected. But slow. Can anything be done?

On Tuesday, July 26, 2016 at 4:32:42 PM UTC+5:30, Bryan Van de ven wrote:

Without code to inspect or run it is impossible to speculate about what might be going on. Can you provide a complete, minimal, run-able test script to reproduce what you are seeing?

Bryan

On Jul 26, 2016, at 04:59, Pragyan Bezbaruah [email protected] wrote:

I have tried webgl in Stacked Bar Chart but Not much improvement.
I have a csv file. Analytics is done in pandas and visualisation is done using Bokeh.

Is there any other way to fast up rendering?

Rendering takes like 5-6 seconds in the Python CLI but when I give the show command, it takes like a minute to show up the visualisation.

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].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/14c55cb7-993a-4f7c-a831-1ffe03397799%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

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].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/4166ab21-f6d3-4b89-901d-b1078397cd18%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Have you tried to add timers to each section to see where it is slow?

i.e. (Python 2)


print datetime.now() - startTime
from datetime import datetime
startTime = datetime.now()

#do a section of code

print datetime.now() - startTime
#do a section of code

``

···

On Tuesday, 26 July 2016 12:47:55 UTC+1, Pragyan Bezbaruah wrote:

Without code to inspect or run it is impossible to speculate about what might be going on. Can you provide a complete, minimal, run-able test script to reproduce what you are seeing?

Bryan

On Jul 26, 2016, at 04:59, Pragyan Bezbaruah [email protected] wrote:

I have tried webgl in Stacked Bar Chart but Not much improvement.
I have a csv file. Analytics is done in pandas and visualisation is done using Bokeh.

Is there any other way to fast up rendering?

Rendering takes like 5-6 seconds in the Python CLI but when I give the show command, it takes like a minute to show up the visualisation.

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].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/14c55cb7-993a-4f7c-a831-1ffe03397799%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Here is the code-

import pandas as pd
import seaborn as sns
import pandas as pd
from bokeh.charts import Bar, output_file, show
from bokeh.charts.attributes import cat, color
from bokeh.charts.operations import blend
from bokeh.charts.utils import df_from_json
from bokeh.charts import Bar, output_file, show

df = pd.read_csv("/home/pragyan/Documents/Pandas-Table/samplereqd-test2.csv")

df = pd.DataFrame(df)

p = Bar(df, values=blend(‘M1’,‘M2’,‘M3’,‘M4’,‘P1’,‘P2’,‘P3’,‘P4’,
name=‘Severity Count’, labels_name=‘severity’),
label=cat(columns=‘Code’,
sort=False), stack=cat(columns=‘severity’),
legend=‘top_right’, title=‘Check if any Particular Code leads to a specific severity’, plot_width=1100,
plot_height=600, tools=“wheel_zoom,pan,reset,resize,save”,
color=[’#87CEFA’,’#9BC4E2’,’#6CA6CD’,’#325C74’,’#EE7942’,’#CD6839’,’#8A360F’,’#5C4033’], webgl=True)

output_file("/home/pragyan/Documents/test2.html")
show§

The code runs well. No error. Runs as expected. But slow. Can anything be done?

On Tuesday, July 26, 2016 at 4:32:42 PM UTC+5:30, Bryan Van de ven wrote:

Also, you seem to be creating a DataFrame from a DataFrame -

df = pd.read_csv("/home/pragyan/Documents/Pandas-Table/samplereqd-test2.csv")

df = pd.DataFrame(df) #this line is redundant?

``

···

On Tuesday, 26 July 2016 15:37:27 UTC+1, Will Kew wrote:

Have you tried to add timers to each section to see where it is slow?

i.e. (Python 2)


print datetime.now() - startTime
from datetime import datetime
startTime = datetime.now()

#do a section of code

print datetime.now() - startTime
#do a section of code

``

On Tuesday, 26 July 2016 12:47:55 UTC+1, Pragyan Bezbaruah wrote:

Without code to inspect or run it is impossible to speculate about what might be going on. Can you provide a complete, minimal, run-able test script to reproduce what you are seeing?

Bryan

On Jul 26, 2016, at 04:59, Pragyan Bezbaruah [email protected] wrote:

I have tried webgl in Stacked Bar Chart but Not much improvement.
I have a csv file. Analytics is done in pandas and visualisation is done using Bokeh.

Is there any other way to fast up rendering?

Rendering takes like 5-6 seconds in the Python CLI but when I give the show command, it takes like a minute to show up the visualisation.

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].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/14c55cb7-993a-4f7c-a831-1ffe03397799%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Here is the code-

import pandas as pd
import seaborn as sns
import pandas as pd
from bokeh.charts import Bar, output_file, show
from bokeh.charts.attributes import cat, color
from bokeh.charts.operations import blend
from bokeh.charts.utils import df_from_json
from bokeh.charts import Bar, output_file, show

df = pd.read_csv("/home/pragyan/Documents/Pandas-Table/samplereqd-test2.csv")

df = pd.DataFrame(df)

p = Bar(df, values=blend(‘M1’,‘M2’,‘M3’,‘M4’,‘P1’,‘P2’,‘P3’,‘P4’,
name=‘Severity Count’, labels_name=‘severity’),
label=cat(columns=‘Code’,
sort=False), stack=cat(columns=‘severity’),
legend=‘top_right’, title=‘Check if any Particular Code leads to a specific severity’, plot_width=1100,
plot_height=600, tools=“wheel_zoom,pan,reset,resize,save”,
color=[’#87CEFA’,’#9BC4E2’,’#6CA6CD’,’#325C74’,’#EE7942’,’#CD6839’,’#8A360F’,’#5C4033’], webgl=True)

output_file("/home/pragyan/Documents/test2.html")
show§

The code runs well. No error. Runs as expected. But slow. Can anything be done?

On Tuesday, July 26, 2016 at 4:32:42 PM UTC+5:30, Bryan Van de ven wrote:

100MB file. Has like 78k records. Hehe. :smiley:

···

On Tuesday, July 26, 2016 at 5:58:18 PM UTC+5:30, Bryan Van de ven wrote:

How big is the csv?

On Jul 26, 2016, at 06:47, Pragyan Bezbaruah [email protected] wrote:

Without code to inspect or run it is impossible to speculate about what might be going on. Can you provide a complete, minimal, run-able test script to reproduce what you are seeing?

Bryan

On Jul 26, 2016, at 04:59, Pragyan Bezbaruah [email protected] wrote:

I have tried webgl in Stacked Bar Chart but Not much improvement.
I have a csv file. Analytics is done in pandas and visualisation is done using Bokeh.

Is there any other way to fast up rendering?

Rendering takes like 5-6 seconds in the Python CLI but when I give the show command, it takes like a minute to show up the visualisation.

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].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/14c55cb7-993a-4f7c-a831-1ffe03397799%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Here is the code-

import pandas as pd
import seaborn as sns
import pandas as pd
from bokeh.charts import Bar, output_file, show
from bokeh.charts.attributes import cat, color
from bokeh.charts.operations import blend
from bokeh.charts.utils import df_from_json
from bokeh.charts import Bar, output_file, show

df = pd.read_csv("/home/pragyan/Documents/Pandas-Table/samplereqd-test2.csv")

df = pd.DataFrame(df)

p = Bar(df, values=blend(‘M1’,‘M2’,‘M3’,‘M4’,‘P1’,‘P2’,‘P3’,‘P4’,
name=‘Severity Count’, labels_name=‘severity’),
label=cat(columns=‘Code’,
sort=False), stack=cat(columns=‘severity’),
legend=‘top_right’, title=‘Check if any Particular Code leads to a specific severity’, plot_width=1100,
plot_height=600, tools=“wheel_zoom,pan,reset,resize,save”,
color=[’#87CEFA’,’#9BC4E2’,’#6CA6CD’,’#325C74’,’#EE7942’,’#CD6839’,’#8A360F’,’#5C4033’], webgl=True)

output_file("/home/pragyan/Documents/test2.html")
show§

The code runs well. No error. Runs as expected. But slow. Can anything be done?

On Tuesday, July 26, 2016 at 4:32:42 PM UTC+5:30, Bryan Van de ven wrote:

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].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/4166ab21-f6d3-4b89-901d-b1078397cd18%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Yes. I followed some forum and they did that. I dont know its purpose but with/without it, the time is similar.
And about the datetime, I didnt think it that way. Will check and let you know. :slight_smile:

Thanks.

···

On Tuesday, July 26, 2016 at 8:08:24 PM UTC+5:30, Will Kew wrote:

Also, you seem to be creating a DataFrame from a DataFrame -

df = pd.read_csv("/home/pragyan/Documents/Pandas-Table/samplereqd-test2.csv")

df = pd.DataFrame(df) #this line is redundant?

``

On Tuesday, 26 July 2016 15:37:27 UTC+1, Will Kew wrote:

Have you tried to add timers to each section to see where it is slow?

i.e. (Python 2)


print datetime.now() - startTime
from datetime import datetime
startTime = datetime.now()

#do a section of code

print datetime.now() - startTime
#do a section of code

``

On Tuesday, 26 July 2016 12:47:55 UTC+1, Pragyan Bezbaruah wrote:

Without code to inspect or run it is impossible to speculate about what might be going on. Can you provide a complete, minimal, run-able test script to reproduce what you are seeing?

Bryan

On Jul 26, 2016, at 04:59, Pragyan Bezbaruah [email protected] wrote:

I have tried webgl in Stacked Bar Chart but Not much improvement.
I have a csv file. Analytics is done in pandas and visualisation is done using Bokeh.

Is there any other way to fast up rendering?

Rendering takes like 5-6 seconds in the Python CLI but when I give the show command, it takes like a minute to show up the visualisation.

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].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/14c55cb7-993a-4f7c-a831-1ffe03397799%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Here is the code-

import pandas as pd
import seaborn as sns
import pandas as pd
from bokeh.charts import Bar, output_file, show
from bokeh.charts.attributes import cat, color
from bokeh.charts.operations import blend
from bokeh.charts.utils import df_from_json
from bokeh.charts import Bar, output_file, show

df = pd.read_csv("/home/pragyan/Documents/Pandas-Table/samplereqd-test2.csv")

df = pd.DataFrame(df)

p = Bar(df, values=blend(‘M1’,‘M2’,‘M3’,‘M4’,‘P1’,‘P2’,‘P3’,‘P4’,
name=‘Severity Count’, labels_name=‘severity’),
label=cat(columns=‘Code’,
sort=False), stack=cat(columns=‘severity’),
legend=‘top_right’, title=‘Check if any Particular Code leads to a specific severity’, plot_width=1100,
plot_height=600, tools=“wheel_zoom,pan,reset,resize,save”,
color=[’#87CEFA’,’#9BC4E2’,’#6CA6CD’,’#325C74’,’#EE7942’,’#CD6839’,’#8A360F’,’#5C4033’], webgl=True)

output_file("/home/pragyan/Documents/test2.html")
show§

The code runs well. No error. Runs as expected. But slow. Can anything be done?

On Tuesday, July 26, 2016 at 4:32:42 PM UTC+5:30, Bryan Van de ven wrote: