Scrolling function has issues (Scroll Jank) - was fixed, happening again?

On windows PC chrome long threads are practically unusable for me, while interestingly I never had any issues with chrome on my android phone.

Sorry I didn’t have time yet to try my idea of tracing I mentioned above. (I’m not an Admin, though)

I tried installing the Tapatalk App for this forum, but I guess forumosa isn’t supported anymore? :man_shrugging:

Correct. Tapatalk is an app intended for phpBB forums. Since Discourse was designed specifically with mobile use in mind, there isn’t a need for apps like Tapatalk. This is one of those “it’s not a bug, it’s a feature” type of situations.

Unfortunately, there are Discourse-specific problems like the Scroll Jank that we need to tolerate

3 Likes

Here is a quick analysis of the percentage of visits on Forumosa that are now done via Mobile. So, switching the software to a Mobile Native one like Discourse makes since - the switch to Discourse occurred in Aug 2016

4 Likes

Idle curiosity: does “mobile” include iPads or tablets? (Doesn’t make any difference, just curious.)

Likely yes.

1 Like

And have hated it since.

(Except for picture uploads)

I joined because discourse made the site so much better.

3 Likes

Yeah, it’s better on the whole, despite the nasty jank issue.

3 Likes

The scroll jank thing wasn’t a thing in previous versions. It seemed to pop up recently.

1 Like

As I’ve mentioned before, if anyone knows a similar mobile friendly forum software with infinite scrolling that doesn’t suffer from this issue, that would be interesting. Discourse knows about the issue and it doesn’t seem to be a priority for them.

2 Likes

Maybe everytime it janks, we mine one new Chia coin.

Jokes

1 Like

There’s probably a way to do that, right?

Who knows. All I know is Codinghorror is also involved with Chia development.

1 Like

This is getting annoying. So I’ll try to help fix (or work around) it.

First important thing for any debugging is duplication. I think I found a way to 100% duplicate. Can anyone please check if you can duplicate scroll jank this way as well, step by step? (@Marco @slawa …)

Note: I’m using Chrome Windows in incognito mode, simply in order to be not logged in. That means I can simply re-start as a “new user” again and again, just by copy & paste an address into the address bar.

Here we go:

  1. Open a new tab. Copy and paste this into the address bar, press ENTER: https://tw.forumosa.com/t/ukraine-invaded-by-the-russians-again/214479/ (= go to a long thread, for example post #1 of the Ukraine war thread)

  2. Click the Forumosa logo on top (= go back to the Forumosa main page)

  3. Click on the Ukraine war thread (= go back to the thread. Discourse “remembered” where you left off and shows post #2, with a red line “last visit” shown above)

  4. Now scroll down. Scroll jank will happen when you reach around post # 17. It will throw you back up to post #3

What I understand so far:

  • The issue doesn’t seem to happen if you haven’t visited a certain thread before, eg. if there is no “last visit” marker

  • Also happens with shorter threads, like 40 posts… I guess everything above ~17 posts might be affected

  • Also happens with old threads, like this one which has the last reply in 2007

  • Does NOT happen if you disable showing images (!). interesting… I’ll look further into this, maybe it can point us to which images (loaded from where) are involved in this issue…

Further details hidden as not to annoy people that just want to help duplicate, not help debug
  • The scroll jank seems to happens when you reach the end of the already loaded posts, when presumably Discourse starts loading the next batch of posts to show next

  • You can see this by looking at the Chrome scroll bar: The scroll jank happens when the scroll bar reaches almost the end

  • Activating the developer tools (CTRL + Shift + i) and looking at the “console”, there are no errors or warnings during that time when the jank happens. There is one “Violation” though, which is visible only when adding “verbose” to the filter levels. Violations seem to to be nothing critical, it seems to be more something like “you might want to look this for Performance optimization”.

  • The violation says “[Violation] ‘setTimeout’ handler took 56ms”. I only see this in the bad case. But it is also visible when disabling images - then the violation appears, but there is NO scroll jank. So I guess this is not related to the root cause.

I recorded what happens, and this is the order in which it happens. Not very useful I’m afraid:

  1. The view jumps back to the older post. At the same time the scroll bar jumps up showing that more posts have been loaded, and the “[Violation] ‘setTimeout’ handler took 56ms” appears

  2. After a very short delay the post counter updates from 17 to 3, where we just jumped to

5 Likes
More details for debugging
1 Like

Ok found out what causes (or at least influences) this: Doubleclick.net , which is advertising related I think.

To fix this under Windows 10 for example, edit the windows hosts file and add the following two lines to it (this re-routes all accesses to these two URLs to your own PC instead, meaning these accesses effectively get blocked)

127.0.0.1 doubleclick.net
127.0.0.1 securepubads.g.doubleclick.net

I had to restart chrome after that, maybe also clearing chrome’s cache is necessary… but anyway, now the scroll jank is gone :banana:

Alternatively, in firefox you can use the extension “Request Blocker”, and add the following to the extension’s block list:

*://*.doubleclick.net/*

Note: Interestingly, only blocking images from the doubleclick domain doesn’t help…

Probably some adblockers would also help

I hope with this info and the step by step duplication instruction it can be fixed by @tempogain or @GooseEgg (if its a setting) or the Discourse team (if its part of the discourse app).

9 Likes

Classic. Shitty ads code f***s up the website.

Good analysis work.
check_minions

5 Likes

Can anyone still see this “scrolling jumps back up” issue?

I can’t duplicate it any more, even without any workarounds. Did this already get fixed somehow?

1 Like

Just did some scrolling in a thread with hundreds of unread posts, and it doesn’t seem to be happening. Fingers crossed!

4 Likes