New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi Month Plugin Forced reflow while executing JavaScript causing laggy interactions #7209
Comments
This also happens with on some demo pages (e.g. event interaction) so I assume it is a general problem. Seems to be the same as #6741 |
@DevDotJoel and @septatrix , I believe you when you say this his happening, but unfortunately I'm not able to recreate. Does this happen upon page load, or after you do some action? Could you record everything (including dev console where this error is appearing) with a screen capture tool like https://gifcap.dev/ ? |
@acerix, a recreation from you would be great as well! |
As can be seen in the screencast it is not completely deterministic and probably depends on CPU utilization etc. Screencast.from.2023-03-14.01-03-44.webm |
Making a performance recording seems to reveal that this is due to calling
As it seems like this cache exists precisely to reduce this impact there does not seems to be a simple fix for this. Improving DOM structure, CSS selectors/styles etc could improve this though that is likely a rather cumbersome process. However, I noticed that the only DOM change (at least in my case) is the addition and removal of the Finally, I am not sure whether @DevDotJoel is experiencing this in the same scenario or under slightly different circumstances as they also mention page loads and date changes. In those two cases I only rarely get the warning (though the calendar I am testing with is rather empty currently), and I fear that in those cases it will be a lot harder to change anything about it (as basically the whole DOM changes in those scenarios). |
In v6.1.5 I've eliminated the fc-selectable className. The problem of reflow while clicking most likely won't be a problem anymore. Could @septatrix and @DevDotJoel please verify? If it helps, I've updated fullcalendar.io's demos page and docs examples to use the latest version |
While May I ask why the class/style gets applied and removed upon click/release? It seems like this is only the case for calendars with Also I would like to emphasize that for me this is barely noticeable and hundreds of ms as reported by Joel. I mostly see values around 50ms. I mostly participate as it bugs me to see warnings in the dev console and problems like these can often point to underlying issues. |
Hey, |
this problem is still ocurring in these versions: I also noticed this happens if i only use multiMonthPlugin is there a fix for this anytime soon? |
i even opened the example that you guys give here : When i open the console i saw the same warning : Forced reflow while executing JavaScript took 90ms. |
Reduced Test Case
https://codesandbox.io/s/quizzical-chandrasekhar-8kux86?file=/src/App.js
Do you understand that if a reduced test case is not provided, we will intentionally delay triaging of your ticket?
Which connector are you using (React/Angular/etc)?
React
Bug Description
Hello,
I'm using full-calendar 6.1.4 for the react connector.
When im using multiMonthPlugin with interactionPlugin and dayGridPlugin i get a warning on my console saying :
"[Violation] 'click' handler took 220ms"
"[Violation] Forced reflow while executing JavaScript took ms"
It happens everytime i load the page, change dates etc
Thanks.
The text was updated successfully, but these errors were encountered: