Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
lutho
Helper II
Helper II

Power BI Desktop with Python slow, once published to the Power BI Service nearly unworkable

Hi All, I am needing the flexibility of python to produce visuals not available. I tried various simple scenarios where I simply graph a grid or basic plot with a dataframe generated within the script (no data feed from Power BI to Python). Here the refresh is 2-3 seconds but when published to the Power BI Service this becomes a 25-40 second delay. So to re-iterate - the visual generates its own data and does not have to fetch any data.

 

This poor performance is unworkable as my audience need to click through and they are simply not going to wait that long per page. My data source settings are direct import - but should not be relevant to this scenario given the data is generated within the visual?

Am I doing something wrong to cause this poor performance? I could not image this to be the norm.

 

Thanks in advance,

 

Lex

 

The scipt is:

 

# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script:

# dataset = pandas.DataFrame()
# dataset = dataset.drop_duplicates()

# Paste or type your script code here:
from matplotlib import pyplot as plt
import numpy as np
randn = np.random.randn
from pandas import *

idx = Index(np.arange(1,11))
df = DataFrame(randn(10, 5), index=idx, columns=['A', 'B', 'C', 'D', 'E'])
vals = np.around(df.values,2)
norm = plt.Normalize(vals.min()-1, vals.max()+1)
colours = plt.cm.hot(norm(vals))
fig = plt.figure()
ax = fig.add_subplot(111, frameon=True, xticks=[], yticks=[])
the_table=plt.table(cellText=vals, rowLabels=df.index, colLabels=df.columns,
colWidths = [0.03]*vals.shape[1], loc='center',
cellColours=colours)
plt.show()

 

1 REPLY 1
lbendlin
Super User
Super User

All this just to see if the RNG has enough entropy? Maybe try the performance of a real dataset?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors