You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
scroll lag after opening and closing calendar (or any other overlay like autocomplete) #12341
could not replicate it, any ideas? I mean if it was for the sheer amount of components it contains, it wouldn't just start behaving like this after opening component with an overlay, right..
Maybe this is happening as a result of a combination of components? It might be easier to see what's going on by doing a recording in the "Performance" tab.
One more thing to try: once you've opened it a few times and it starts lagging, can you try finding the cdk-overlay-container in the DOM and adding a display: none to it, and seeing if the lag goes away?
One more thing to try: once you've opened it a few times and it starts lagging, can you try finding the cdk-overlay-container in the DOM and adding a display: none to it, and seeing if the lag goes away?
It's because, even though they're transparent and unclickable, the elements are still being rendered over the page. Since they're position: fixed, they have to be redrawn while you're scrolling.
But it does. Or something does. Nothing really changed since it was "fixed". See https://youtu.be/rvzkiTx4_Fk it's smooth the first time I open the popover, after I close it and open it again, it lags a lot..
That's why I asked in the first place, looking the changelog it seemed like the fix was included in 6.4.3 monelite-meeple and I'm running "@angular/material": "6.4.7"..
I'm not sure why it ended up in both versions, but an easy way to verify it is to open and close the overlay a couple of times, click around the page somewhere to trigger a round of change detection and see if the cdk-overlay-container is empty.
Also cdk-overlay-container is indeed display: none;.. but it doesn't fix the lag.. funnily enough it did, when I previously added it manually, as mentioned here #12341 (comment)
Activity
fxck commentedon Jul 24, 2018
https://stackblitz.com/edit/material-scroll-lag-9qzbai?file=app%2Fsimple-example%2Fsimple-example.component.ts
could not replicate it, any ideas? I mean if it was for the sheer amount of components it contains, it wouldn't just start behaving like this after opening component with an overlay, right..
crisbeto commentedon Jul 24, 2018
Maybe this is happening as a result of a combination of components? It might be easier to see what's going on by doing a recording in the "Performance" tab.
crisbeto commentedon Jul 24, 2018
One more thing to try: once you've opened it a few times and it starts lagging, can you try finding the
cdk-overlay-containerin the DOM and adding adisplay: noneto it, and seeing if the lag goes away?fxck commentedon Jul 27, 2018
Can't, it would hide the popover as well.
crisbeto commentedon Jul 27, 2018
It's a bit more work, but you should be able to hide the
cdk-overlay-connected-position-bounding-boxfor the closed overlays.fxck commentedon Jul 27, 2018
Ok, that did fix the lag.
crisbeto commentedon Jul 27, 2018
Cool, thanks for checking. In that case we should move the detached overlays out of the DOM completely.
fxck commentedon Jul 27, 2018
I still can't quite understand why is it happening, that
cdk-overlay-connected-position-bounding-boxseems harmless..crisbeto commentedon Jul 27, 2018
It's because, even though they're transparent and unclickable, the elements are still being rendered over the page. Since they're
position: fixed, they have to be redrawn while you're scrolling.perf(overlay): remove detached overlays from the DOM
7 remaining items
crisbeto commentedon Sep 26, 2018
The
cdk-overlay-containeris still in the DOM, but it'sdisplay: noneso it won't have an effect on rendering.fxck commentedon Sep 26, 2018
But it does. Or something does. Nothing really changed since it was "fixed". See https://youtu.be/rvzkiTx4_Fk it's smooth the first time I open the popover, after I close it and open it again, it lags a lot..
crisbeto commentedon Sep 26, 2018
For what it's worth, that fix actually went into 7.0.0-beta.0, but judging by your video you're running Angular 6.1.8.
fxck commentedon Sep 26, 2018
That's why I asked in the first place, looking the changelog it seemed like the fix was included in
6.4.3 monelite-meepleand I'm running"@angular/material": "6.4.7"..crisbeto commentedon Sep 26, 2018
I'm not sure why it ended up in both versions, but an easy way to verify it is to open and close the overlay a couple of times, click around the page somewhere to trigger a round of change detection and see if the
cdk-overlay-containeris empty.fxck commentedon Sep 26, 2018
Also
cdk-overlay-containeris indeeddisplay: none;.. but it doesn't fix the lag.. funnily enough it did, when I previously added it manually, as mentioned here #12341 (comment)crisbeto commentedon Sep 28, 2018
Then it's most likely something different, but it's hard to say by looking at a video.
fxck commentedon Sep 28, 2018
What can I do (to help you debug it)?
crisbeto commentedon Sep 29, 2018
Taking a performance recording while scrolling on a list that is laggy could help identify where it's coming from.
angular-automatic-lock-bot commentedon Sep 9, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
perf(overlay): remove detached overlays from the DOM (angular#12414)
perf(overlay): remove detached overlays from the DOM (angular#12414)
perf(overlay): remove detached overlays from the DOM (angular#12414)
perf(overlay): remove detached overlays from the DOM (angular#12414)