Forum Discussion
Performance Issues with Custom HubSpot Connector in Power BI (Function.InvokeAfter)
You can consider to use Table.Buffer() to buffer a table in memory, you can refer to the following link about it .
Table.Buffer - PowerQuery M | Microsoft Learn
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous
Unfortunately using Table.Buffer() has no effect on the performance for me.
I tried using it at various location in my code and even just as an extra step in the transformation window in Power Bi, but to no avail. As soon as InvokeAfter is in the code, a delay is added to all subsequent transformations as it seems.
I've coded a little test function (adding a column to the source table), which reliably comes to the same result if run multiple times:
- The code without InvokeAfter takes ~0.5 sec to add a new Column.
- With InvokeAfter, the addColumn function takes ~ 7 sec.
- Both variants are equally performant when adding Table.Buffer() or Table.StopFolding().
Anyway, thank you for your help!
Best regards,
SparkByte_202