Forum Discussion
List.Generate performance
Hi Laura_Dannisoe ,
a buffer is useful to stop re-evaluating tables or lists that will be referenced multiple times in iterators (like List.Generate, -.Accumulate, -.Transform or Table.AddColumn).
But in your iterator here (List.Generate), there is no direct list or table input (just records or scalars). Therefore you cannot use it here.
Does the function you're calling ("Resumekey_function") reference a table or a list? Then you might want to buffer that in there.
There are other things to watch out for when optimizing performance: Speed/Performance aspects – The BIccountant maybe you find a hint in there.
Hi Imke
Thank you for your answer.
The resumekey function looks like below - is there anything here I could buffer?
let
Kilde = (EndPoint as text, Resumekey as text, optional Changedate) =>
let
changedate = if Changedate = null then "" else Changedate,
url = "XXXXXXXXXXXXXX",
body = [contract=MB_Agreement,apikey=MB_Key,username=MB_User,password=MB_Password,commands={[command=EndPoint,changedate=changedate,resumekey=Resumekey]}],
data = Json.Document(Web.Contents(url,[Headers=[#"Content-Type"="application/json"], Content=Json.FromValue(body), IsRetry=true
]))[results]
in data
in
Kilde
It is just very frustrating that it takes 1,5 hours to refresh and 15 minutes to retrieve data from one table, so I thought there must be a way to handle this faster.
- ImkeF4 years agoCommunity Champion
Hi Laura_Dannisoe ,
no, cannot spot a table or a list to buffer in here.
Did you experience the performance degradation just today? Is it in dataflows in a Europe region?Then this might just be a temporary problem: Slow Dataflow Refresh - Microsoft Power BI Community
Otherwise: How many other queries are there in your file/dataflow?
- Laura_Dannisoe4 years agoFrequent Visitor
Hi Imke
No I have experienced this ever since I did the API calls. Some dataflows only have 1 query while others have 5 queries.
I have tried to optimize the performance by reducing the columns in each table, but that did not improve anything, so I am quite sure it is the function calling the API which is extremely slow. When I call the API in another system it is not that slow.