Skip to content
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

[BUG] Improve feed view scrolling performance and behaviour #25

Open
boscojwho opened this issue Jul 19, 2023 · 10 comments
Open

[BUG] Improve feed view scrolling performance and behaviour #25

boscojwho opened this issue Jul 19, 2023 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@boscojwho
Copy link
Contributor

Describe the bug
In feed view:

  • Scrolling frame rate is low
  • Scrolling is at times blocked (This literally also happens in macOS System Settings, too, lol)
  • Scroll position is lost when new posts load(?)
  • Scroll position shifts when post images load
  • Overall, feed view could feel better.

Expected behavior
A clear and concise description of what you expected to happen.

Information:

  • version 0.1
@boscojwho boscojwho added the bug Something isn't working label Jul 19, 2023
@boscojwho
Copy link
Contributor Author

I did a quick test and removed GeometryReader and ScrollViewReader from FeedView, but scrolling performance felt relatively the same.

@boscojwho
Copy link
Contributor Author

boscojwho commented Jul 19, 2023

Seems like the solutions are pretty simple:

  1. Push some post loading calls onto some background tasks in FeedView. In particular, the system hasher is using quite a bit of CPU time when processing PostView.
  2. SessionStorage appears to be causing some long main thread hangups on launch.

This is probably the top issue affecting my personal enjoyment of this app, so I might dive into this later tonight or possibly tomorrow =D

@Athlon007
Copy link
Owner

I think my only issue with the current FeedView changes is the page's sidebar is still visible, even in the smallest window width. I don't think page's sidebar is important enough to show all the time. In other views - that's not a problem, as the person's/community's sidebar is moved to the top of main column, but for Feed - that was never implemented, as page sidebars can be very, very long.

With that being said, good job and thanks for the changes :)

@boscojwho
Copy link
Contributor Author

I think my only issue with the current FeedView changes is the page's sidebar is still visible, even in the smallest window width. I don't think page's sidebar is important enough to show all the time. In other views - that's not a problem, as the person's/community's sidebar is moved to the top of main column, but for Feed - that was never implemented, as page sidebars can be very, very long.

With that being said, good job and thanks for the changes :)

No worries =) Very fun to work on a Mac app and something new

Ohh, that explains why FeedView implementation looked slightly different from the others haha. I almost never use Mac apps in narrow width (angrily shakes fist at new System Settings). Definitely a design issue to be dealt with separately.

@Athlon007
Copy link
Owner

Yeah, but I know my code Swift was meh at the very least. I'll definitely borrow couple of tricks you have added in the future UI code.

I'll think about how to approach the page sidebar tomorrow. I already have something in my head that will work.

@boscojwho
Copy link
Contributor Author

Got scrolling performance to a better level, and reduced the number of times where scroll view doesn't catch a swipe gesture because it blocked the main thread.

  • Also moved a post-processing task in PostUIView off the main thread (need to clean this up before I make a PR). This seems like this was causing quite a bit of the missed swipes.

@boscojwho
Copy link
Contributor Author

Actually will keep this issue open for now, since we need to apply scrolling optimizations to Community feed.

@BraveSentry
Copy link

Actually will keep this issue open for now, since we need to apply scrolling optimizations to Community feed.

Thanks for that, as I have a scrolling related minor issue: When the mouse pointer is in the same window part as the feed but in the blank area left of the feed, scrolling does not work. I can only scroll when the mouse pointer is directly on the feed.

@boscojwho
Copy link
Contributor Author

boscojwho commented Jul 23, 2023

Actually will keep this issue open for now, since we need to apply scrolling optimizations to Community feed.

Thanks for that, as I have a scrolling related minor issue: When the mouse pointer is in the same window part as the feed but in the blank area left of the feed, scrolling does not work. I can only scroll when the mouse pointer is directly on the feed.

Ah yes, good point, I noticed that too. That's because the Feed view has a maximum width, so that blank area isn't scrollable at the moment. I guess at the very least, we could make the Feed view be leading aligned, so that blank space to the left gets taken out. Perhaps @Athlon007 has more ideas here =)

@Athlon007
Copy link
Owner

Actually will keep this issue open for now, since we need to apply scrolling optimizations to Community feed.

Thanks for that, as I have a scrolling related minor issue: When the mouse pointer is in the same window part as the feed but in the blank area left of the feed, scrolling does not work. I can only scroll when the mouse pointer is directly on the feed.

Ah yes, good point, I noticed that too. That's because the Feed view has a maximum width, so that blank area isn't scrollable at the moment. I guess at the very least, we could make the Feed view be leading aligned, so that blank space to the left gets taken out. Perhaps @Athlon007 has more ideas here =)

It's definitely something worth to take a look at, however, not for 0.2. I consider 0.2 feature locked.

@Athlon007 Athlon007 moved this from Done to Bugs in Leomard Jul 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Bugs
Development

No branches or pull requests

3 participants