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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

R visualization runs slow

Hi all,

 

I have a pbix file with some R visualizations I have like 10 pages and every time when I change through pages the R programming is loading. 

 
 

When I change through pages always appears loading many seconds 

 

Is there a way to avoid this? like set pre charged visualization and only if I change a filter the r visualization runs 

 

Best regards

1 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @Anonymous,

Page changes within a report are treated as a 'data update' event within a visual container and they're all refreshed. This is a bit of a downside of the R and Python visuals.

Each visual is treated as a sandbox and essentially its own runtime environment. As Power BI visual containers are web-based, the data frame + script is sent to the "server" on each visual update for processing - either the specified R instance on your local machine, or the version hosted by the Power BI service if your're hosting up there - and returned back to the client (your visual container).

There is certainly the apperance of a "cold start" while this is going on and can be quite frustrating if you have a lot of visuals on a page or frequently change slicers or cross-filter. It's one of the reasons I moved to custom visuals in TypeScript, as you can structure your code to do most of the processing be done client-side (unless you're specifically sending data over HTTP for processing).

David Eldersveld has a really good post on optimising R and Python scripts within Power BI, or at least as much as can be given the architecture in-place, and explains a lot more about what happens under the hood (much better than I can).

This may not give you exactly what you need but might help you with planning out an alternative approach if you want to stick with R inside Power BI.

Daniel


If my post solves your challenge, then please consider accepting as a solution to help other forum members find the answer more quickly 🙂





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

Proud to be a Super User!


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




View solution in original post

1 REPLY 1
dm-p
Super User
Super User

Hi @Anonymous,

Page changes within a report are treated as a 'data update' event within a visual container and they're all refreshed. This is a bit of a downside of the R and Python visuals.

Each visual is treated as a sandbox and essentially its own runtime environment. As Power BI visual containers are web-based, the data frame + script is sent to the "server" on each visual update for processing - either the specified R instance on your local machine, or the version hosted by the Power BI service if your're hosting up there - and returned back to the client (your visual container).

There is certainly the apperance of a "cold start" while this is going on and can be quite frustrating if you have a lot of visuals on a page or frequently change slicers or cross-filter. It's one of the reasons I moved to custom visuals in TypeScript, as you can structure your code to do most of the processing be done client-side (unless you're specifically sending data over HTTP for processing).

David Eldersveld has a really good post on optimising R and Python scripts within Power BI, or at least as much as can be given the architecture in-place, and explains a lot more about what happens under the hood (much better than I can).

This may not give you exactly what you need but might help you with planning out an alternative approach if you want to stick with R inside Power BI.

Daniel


If my post solves your challenge, then please consider accepting as a solution to help other forum members find the answer more quickly 🙂





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

Proud to be a Super User!


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




Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors