Calendar Refresh Causing Page Unresponsive

1
Hello All,   I have a scenario with a calendar widget inside a data view. The data view is sourced by context, and will always have a "CalendarContext" object (which is a persistent entity but never committed as a new one is generated (and deleted) per user/session).    My calendar widget is sourced via database object, lets call it "CalendarObject".    I also have an Input Reference Selector on this page, inside the data view. The user is allowed to select 1 or many objects, lets call them "Filters" which are associated to the CalendarContext, and the calendar will be updated based on the selections.    The Input Ref Selector has an OnChange that calls a microflow which does some stuff (updates the color for example) to the CalendarObjects, then refreshes the CalendarContext entity.    The issue I'm running into is if the user adjusts the selected Filter objects more than ~twice I have an long load time and eventually get the Page Unresponsive error from the browser. This is happening even in my local where I really don't have that many CalendarObjects, or data in general.    As a test, I changed the DS on the calendar from database to microflow, and in the microflow I'm doing the same database retrieve I expect the widget is doing when sourcing from database. I notice that after a few times of changing the selected Filter Objects, this DS microflow is running way more times than expected. Even when I remove the CalendarContext refresh from the OnChange microflow. After the first change of selected Filter objects, I see 5 or so instances of the microflow in the debugger, and after I hit continue on one of them, another instance will pop up, and so on and so forth.    Any ideas why this may be happening???  Thank you!
asked
2 answers
1

Hi Ben,

 

Look in the DS_ on the calendar if you create a new Object every time you run the Microflow. Build in a check if a Calendar Object exists before creating a new one, or, depending on your use case, delete the object.

 

The answer is very general; I would need more details and debug information to make it specific.

 

Go Make I

 

answered
1

I understand this is a fairly unique problem, but I did resolve this issue and wanted to include how:

 

In my OnChange microflow attached to the reference set selector, I was making changes to as many as all of the CalendarObjects, but did not commit them. For whatever reason, this was confusing the calendar widget and causing it to reload many more times than expected. After adding a commit activity in the OnChange, the unexpected behavior stopped. 

answered