Select to view content in your preferred language

Experience builder with custom widget: Chrome out of memory when it runs

714
2
Jump to solution
07-16-2024 11:49 AM
Labels (1)
DiegoSatian
Emerging Contributor

Hi Community,

At the moment, I am developing a custom widget for Experience Builder. Basically, the widget takes 3 different layers from the map and performs an intersection analysis between them in order to obtain how many points are inside of each polygon and how many polygons contain a point, according to the selection of the user through radio buttons. After that, the user can also print the results as a CSV file with the button at the bottom. (Image 1)

                                                                               DiegoSatian_0-1721154903264.png

Image1. UI Widget

All the code is working good and the widget makes what it supposes to do. But suddenly everything stops working and I received a message from Chrome (Image 2) and it says that the browser is out of memory. I already did what Crhome suggests like: cleaning cookies, uninstall chrome extensions, reinstalling Chrome, etc. But I don't find the solution. I have other Experiences with other custom widgets and they work good, the problem is just with this widget. I am working with Experience Builder V 1.14 release date 20.03.2024.

                                               DiegoSatian_1-1721155253002.png

Image 2. Chrome message

I will appreciate your help or any comment from someone that has experienced something similar. It would be very helpfull for me. I am pretty new in the widget development topic.

Thanks,

Diego

 

 

 

 

0 Kudos
1 Solution

Accepted Solutions
JeffreyThompson2
MVP Frequent Contributor

Chrome is a memory hog at the best of times and Experience Builder is as well. The geographic calculations you describe are also memory intensive. I can't say for certain where the problem is without knowing your code and your data, but here are my suggestions.

  • Turn off the Enable Client-Side Query option in the Map Widget. When it is on, it will load more data into your browser's memory.JeffreyThompson2_0-1721221857255.png
  • Don't run any calculations until the user has made all their choices and limit the number of times the user can run this tool before needing to reload. 

  • Simplify your data by limiting the geographic area it covers, removing unused features and using generalization. Every vertex on a polygon increases the number of calculations exponentially. 
GIS Developer
City of Arlington, Texas

View solution in original post

2 Replies
JeffreyThompson2
MVP Frequent Contributor

Chrome is a memory hog at the best of times and Experience Builder is as well. The geographic calculations you describe are also memory intensive. I can't say for certain where the problem is without knowing your code and your data, but here are my suggestions.

  • Turn off the Enable Client-Side Query option in the Map Widget. When it is on, it will load more data into your browser's memory.JeffreyThompson2_0-1721221857255.png
  • Don't run any calculations until the user has made all their choices and limit the number of times the user can run this tool before needing to reload. 

  • Simplify your data by limiting the geographic area it covers, removing unused features and using generalization. Every vertex on a polygon increases the number of calculations exponentially. 
GIS Developer
City of Arlington, Texas
DiegoSatian
Emerging Contributor

Hi Jeffrey,

Thank you very much for your answer and advices. I already fixed the problem, it was something in my code. But I will read more about the client-side quesry topic. Besides that, I am also trying to make my widget more simple and not so memory consuming. In terms of limiting the area, I thought about that and the analysis just run for the features contained into the map extent.

Once again, thank you.

Greetings,

Diego

0 Kudos