-
Notifications
You must be signed in to change notification settings - Fork 135
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
[Question] Alternative method to get last Unread post #1227
Comments
Thanks. I'll investigate when I have time, but I suspect a lot of these layout calculations are things that are going to be happening anyway, whether or not 4chan X forces them to happen immediately by querying the height/position of elements. |
No worries dude. Times like these makes me wish I understood the build process to help out. 😞 One day. |
If there's something in the build instructions you don't understand, please ask about it; there are probably many other people who don't understand it. And that needs to be fixed. |
It's more or less some of the stuff brought up in #829. Once I start seeing It's the same issue regarding @qqueue's c4 (he even went so far to try and make it idiot(me)-friendly). |
Not a bug, more just something to feed my curiosity.
I'm trying to debug some horrible reflow that happens when using my userstyle, which is particularly evident in threads with ~200+ posts.
Two example GIFs here and here along with a Timeline screenshot.
One of the first ones, 206ms, is a this part of code for autohiding scrollbars (which I don't have enabled - I can't even find the option). Developer Tools tells me it affects 8875 elements. This also only happens on the extension, this does not appear when running from the userscript.
One of the next big ones is here, timing for ~350ms and affecting 11379 elements. This recalculation then causes a layout change of ~230ms for 19959 elements. Which in turns causes another 130ms recalculate style for 5368 elements, forced by this bit.
And occassionaly this part pops up too.
This is where my curiosity starts. Because turning off my userstyle, and going back to default styling, these reflows still occur with the same times.
Was just wondering if something like
scrollIntoView()
[1][2] could be used.Also, I don't know if this is applicable, but I've seen mention of wrapping scroll events in
requestAnimationFrame
[1][2][3] too.I don't know if this would alleviate some of the reflow issues? Was curious - or perhaps you've even tested this already.
Something like: when in a thread, keep a note of which post is at the bottom of the window and storing that somewhere (e.g.
thread/101959270#p101960071
) and then when a user goes back to that thread, do something with thatscrollIntoView
event?Sorry for this mini-blog. I would've preferred to email something like this, but I couldn't find one. Was just curious, and am trying to find an answer for my reflow issues.
EDIT: While I found the offending CSS in my userstyle, I would like to think there is still something here.
EDIT2: The offending line is actually https://github.com/ccd0/4chan-x/blob/master/src/Monitoring/Unread.coffee#L176
The text was updated successfully, but these errors were encountered: