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
Anonymous
Not applicable

Multiple custom visual performance

I have begun including multiple custom visuals in my report, and the report is taking significant performance hits. Power BI crashes frequently and the pages are taking forever to load/render/interact. I have many more custom visuals that I intend to create and include in my report in the future. I was wondering if anyone has found any ways to alleviate this or work around performance hits with Power BI custom visuals: 

  • Is there something other than code refinement/optimization to make the custom visuals integrate more seamlessly in Power BI reports?
  • Methods/strategies to alleviate Power BI processing with the inclusion of custom visuals?
  • Distillation of multiple visuals into one custom visual?
1 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @Anonymous,

There are a couple of major possibilities here:

If you've ruled these out then it will be a case of profiling parts of your code to determine if they are perhaps not performing as well as they might be able to. I have found this very useful to understand how many times a function is being called, as well as how long it may take to execute and have previously made successful optimisations to the way I map data from the dataView into my view model using this method.

You can also use the performance analyzer within Power BI Desktop to rule out something like the incoming DAX query being the problem. If the DAX query takes a long time then this is nothing to do with the visual as their code doesn't execute until the main Power BI window supplies it with the dataView.

Another technique is checking options.type in the update method. You don't need to map your view model data every time the visual updates (e.g. if resizing), only when new data is supplied. Here's an example of how I handle this in one of my visuals.

If you've ruled out the above, it's probably worth having a further look at your visual code. If you're able to share a repository or similar location then it might be possible to take a look and see if there's anything obvious.

Anyway, I hope this gives you some ideas for your investigations.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

3 REPLIES 3
dm-p
Super User
Super User

Hi @Anonymous,

There are a couple of major possibilities here:

If you've ruled these out then it will be a case of profiling parts of your code to determine if they are perhaps not performing as well as they might be able to. I have found this very useful to understand how many times a function is being called, as well as how long it may take to execute and have previously made successful optimisations to the way I map data from the dataView into my view model using this method.

You can also use the performance analyzer within Power BI Desktop to rule out something like the incoming DAX query being the problem. If the DAX query takes a long time then this is nothing to do with the visual as their code doesn't execute until the main Power BI window supplies it with the dataView.

Another technique is checking options.type in the update method. You don't need to map your view model data every time the visual updates (e.g. if resizing), only when new data is supplied. Here's an example of how I handle this in one of my visuals.

If you've ruled out the above, it's probably worth having a further look at your visual code. If you're able to share a repository or similar location then it might be possible to take a look and see if there's anything obvious.

Anyway, I hope this gives you some ideas for your investigations.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Anonymous
Not applicable

Thanks so much! I apologize for the delayed response. I was able to use your suggestions to significantly improve my custom visual. Your in-depth guidelines really made a significant difference. I think updating the SDK and finding some redundancies in the code did the trick! 

You're very welcome! Glad the advice worked for you and great to hear you've managed to improve performance in your visual 🙂




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




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.