[REACT] custom eventRenderer which return JSX, cause a significant delay in rendering events
Posted: Tue Jun 11, 2024 12:21 pm
by danielrubak
When using a custom eventRenderer that returns JSX, there is a significant delay in rendering events when scrolling, compared to when it returns a string. Additionally, multiple warnings appear in the console:
Warning: flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.
I want to attach a minimal reproducible example to this post, but there is an error when attaching it:
HTTP Error.
and in console:
Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
Re: [REACT] custom eventRenderer which return JSX, cause a significant delay in rendering events
Posted: Tue Jun 11, 2024 12:44 pm
by ghulam.ghous
Hi Daniel,
Thanks for reporting this. Have you faced the error while attaching a zip? Uploading a zip is working fine on our end. If you still facing the issue, please upload it to google drive and share the link here. and please make sure to provide the access to everyone with the link.
Regards,
Ghous
Re: [REACT] custom eventRenderer which return JSX, cause a significant delay in rendering events
Posted: Tue Jun 11, 2024 2:05 pm
by danielrubak
Yes, I am facing an error when attaching a zip file. Here is the link to the zip file on Google Drive:
Re: [REACT] custom eventRenderer which return JSX, cause a significant delay in rendering events
Posted: Tue Jun 11, 2024 5:47 pm
by danielrubak
This solved the warnings, but there's still a significant delay when returning JSX in the custom eventRenderer compared to a string. The rendering time is about fifteen times longer with JSX.
I've attached a link to a folder with videos that show the performance difference.
Re: [REACT] custom eventRenderer which return JSX, cause a significant delay in rendering events
Posted: Tue Jun 11, 2024 8:49 pm
by alex.l
Hi,
Could you please test performance in prod mode? Will it still be slow for you?
Re: [REACT] custom eventRenderer which return JSX, cause a significant delay in rendering events
Posted: Wed Jun 12, 2024 8:05 am
by danielrubak
Hi,
I tested it in production mode, and there's still a huge difference in rendering times between JSX and string for the custom eventRenderer. I've added to google drive folder videos with performance in prod mode:
Re: [REACT] custom eventRenderer which return JSX, cause a significant delay in rendering events
Posted: Mon Jun 17, 2024 6:14 pm
by odiyaerlichster
Hi,
We are also experiencing the same performance decrease that Daniel stated, when using JSX in eventRendered as opposed to a string there is a major decrease in performance.
Additionally, we are still seeing the flushSync warning, we are using assignments and not resourceId.
I see there is an issue open to investigate this, is there an ETA on when this will be resolved?
Re: [REACT] custom eventRenderer which return JSX, cause a significant delay in rendering events
Posted: Mon Jun 17, 2024 8:20 pm
by marcio
Hey Odiya,
Thanks for reaching out.
Unfortunately, there is no updates, but I let our team know if we can improve the priority of that ticket to identify and provide details of what could be done to not have that performance issue.