Our pure JavaScript Scheduler component


Post by calendardeveloper »

I have data stored in a IndexedDb database. I am displaying roughly 100 resources with each resource having about 40-50 events. So, a total of about 5K events.

When I filter the data and reset the eventStore and resourceStore, I see this error.

ResizeObserver loop limit exceeded

Is this a known issue? or any other similar issues? I saw that another similar issue was marked as resolved in 5.2.9 but I am already using the latest version.


Post by marcio »

Hey calendardeveloper,

Are you able to share a sample project with your configuration and a sample of data?? We have a demo for big dataset with some optimizations for performance, you can check it here https://bryntum.com/products/schedulerpro/examples/bigdataset/

Best regards,
Márcio


Post by calendardeveloper »

I looked at the example and modified my code to look like below. It is calculating the new events and resources and then just setting the inlineData. But as soon as I do that, I get the error. It will take me some time to create a separate project with the sample data - but the below code is what I am doing pretty much. My event is based on a custom EventModel as I had to add a few custom properties.

      multiSchedulerInstance.suspendRefresh();
      multiProject.current.instance.inlineData = {
        resourcesData: resources,
        eventsData: events,
        timeRangesData: timeRanges,
      };
      multiSchedulerInstance.resumeRefresh();

Post by marcio »

Hey,

I see, I answered your post related to that here viewtopic.php?p=125516#p125516

If you change your code for the suggested snippet, do you get the same result?

Best regards,
Márcio


Post by calendardeveloper »

Yes I changed the code but the problem is still there. Is there a ResizeObserver in the code somewhere? If you can tell me, where it is, it might point me in the right direction as to what might be happening? Like I said before, I have an event search which is outside of the main scheduler. And when I search, I set the inlineData.events again, and that is 10k+ events sometimes. It seems to work the first time when the scheduler loads. The problem is only when I reset the inlineData.


Post by mats »

Why not filter the eventStore directly instead of reloading new events using inlineData?

Are you able to share a simple test case with us so we can try to reproduce the error?


Post by calendardeveloper »

It's not the events I am filtering....it's actually the resources I am filtering. So, e.g. at first, I have 200 resources with 50-70 events each and then after a search, I might have 50 resources left. The search is done on a local IndexedDb database and search is performed on several fields which are not part of the ResourceModel or EventModel. Any suggestions ?


Post by calendardeveloper »

I just tried filtering the resources (instead of resetting the inlineData) and I still get the same ResizeObserver issue.

  useEffect(() => {
    const schedulerInstance = multiSchedulerRef.current?.instance;

if (!schedulerInstance) {
  return;
}

if (searchType === 'person' && searchCriteria?.key === 'displayCode' && searchCriteria?.value) {
  const resourceStore = schedulerInstance.resourceStore;
  resourceStore.filter({
    filters: [{ property: 'display_code', value: searchCriteria.value, caseSensitive: false, operator: '=' }],
  });

}
  }, [searchType, searchCriteria]);

Post by calendardeveloper »

This seems to be happening pretty consistently. Need a solution.


Post by mats »

Can you please share a simple test case with us so we can reproduce it?

Does this error affect your app negatively in any way?


Post Reply