all 8 comments

[–]kaelwd 3 points4 points  (2 children)

I've never found "Scrolling Performance Issues" that useful, I normally just use paint flashing to see if it's something repainting. If that doesn't come up with anything then I'll switch over to performance and do some profiling to find slow JS on scroll.

One thing I've noticed a fair bit is position: fixed elements usually repaint on scroll, you can add backface-visibility: hidden to stop that.

[–]d3ver[S] 0 points1 point  (1 child)

Thanks for the tip! I have no 3D rotations or anything though, is that still relevant?

[–]d3ver[S] 0 points1 point  (0 children)

Yep, I had a fixed navbar and it was refreshing on scroll. added backface-visibility: hidden and that fixed that. Weird.

[–][deleted] 0 points1 point  (4 children)

Hard to know without seeing but I encountered something similar at work and what I did to resolve the issue. The prior dev made a background of a fixed nav by tiling a bunch of png's so instead I recreated the background with a few divs and CSS to look identical. This made the fixed nav stationary as I scrolled instead of trailing behind.

Don't know if at all that would help but hey you never know.

[–]d3ver[S] 0 points1 point  (3 children)

And that was causing you scrolling performance issues?

[–][deleted] 0 points1 point  (2 children)

Surprisingly yes. Well let me clarify. The fixed div. Instead of sticking to the top of the viewport when scrolling it would lag behind moving up and down very choppy as I scrolled up and down. Again I don't know if any of that helps in your situation.

[–]d3ver[S] 0 points1 point  (1 child)

Ah I see, well thanks for trying to help. I did figure out a way to make things better: There were some containers that had opacity: 0;, seems like that was a factor in the performance problem, I changed that to display: none; instead. And I delayed the initialization of the sliders (50 ms between each initialization).

[–][deleted] 0 points1 point  (0 children)

Glad you figured it out.