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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
swamisharma
Frequent Visitor

Optimizing Update Function Performance in Power BI Custom Visual with Viewer and Element ID Data

I am developing a custom visual for Power BI, where I need to handle two types of data:

  1. Viewer Data: Used for loading a viewer and geometry of the model.
  2. Element ID Data: Used to enable cross-highlighting functionality.

Currently, I have implemented the viewer data as a separate column. Each row in this column contains small chunks of data (~4 KB). However, as the model size increases, the number of rows in the viewer data column also grows. This results in significant processing time for the update function in the custom visual because it processes this data on every update triggered by Power BI.

The key point is that I only need the viewer data until the viewer and model geometry are fully loaded. After that, it becomes redundant for subsequent updates.

Question:

Is there a way to optimize this process by removing or bypassing the dependency on viewer data in subsequent update function calls? I aim to improve performance by ensuring that the update function does not process this data unnecessarily for every update from Power BI.

Any suggestions or best practices to address this issue would be highly appreciated!

6 REPLIES 6
swamisharma
Frequent Visitor

@jerry_cai ,
Can you elaborate more on this a bit with an example?  what do you mean by "to add a sieve step during development" and "removing filtering step"?

basically what we're looking for is a way to achieve following if possible.
Is there any way we just detach the colum from lengen after it is loaded for the first time in the visual..?


Anonymous
Not applicable

Hi, @swamisharma 

You can render only elements that have changed. Store the previous state of the data and compare it to the new state. If not, skip the rendering process for these elements. You can check the following link:

Tips for creating quality Power BI custom visuals - Power BI | Microsoft Learn

 

Make sure your data model is optimized. Use techniques such as data reduction, efficient data types, and minimizing the number of columns and rows processed. You can check the following link:

Optimization guide for Power BI - Power BI | Microsoft Learn

 

Leverage Power BI's Performance Analyzer to identify bottlenecks in visual update capabilities. This tool can help you identify specific areas that need to be optimized. You can check this link:

Deep dive into Optimize ribbon and streamline your Power BI authoring | Microsoft Power BI Blog | Mi...

 

How to Get Your Question Answered Quickly

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Let me reword my problem in more generic way,

 

I have a data table out of wihch there is a column carring huge data - this data doesn't change per session as in, once provided to visual it is not needed anymore. it may change for different users and different reports but not during the session.

 

Our observations for a data set,

 

1. Provide this column to visual's one of the legend and keept it - the update function for any change takes 1.5 - 2 mins (roughly it has 75k rows)
2. Provide this column to visual's one of the legend and after the data loaded in visual, removed the colunm from legend manually - the update funtion for any change takes 5-6 seconds only.

 

What we're doing with the data in the visual?

 

We read the data for the first time and cache it in visual memory. And there after we don't at all refer to the data coming in update function parameter for this specific column.

 

Is there any way we just detach the colum from lengen after it is loaded for the first time in visual..?

 

We're not sure why the there such a huge difference in performance, is this gap really due to the fact that power bi just carries this much data on every update call? is ther any way we can stop this.? 


@Anonymous 

jerry_cai
New Member

It is recommended to add a sieve step during development to reduce the amount of data cache. Once the development is complete, the filtering step is removed and all the data is obtained

jerry_cai
New Member

It is recommended to add a sieve step during development to reduce the amount of data cache. Once the development is complete, the filtering step is removed and all the data is obtained

jerry_cai
New Member

It is recommended to add a sieve step during development to reduce the amount of data cache. Once the development is complete, the filtering step is removed and all the data is obtained

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.