Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@hjiangsu
Copy link
Member

@hjiangsu hjiangsu commented Mar 13, 2025

Pull Request Description

This PR applies a small change where if tablet mode is disabled, the feed post list will fallback to use SliverList rather than SliverMasonryGrid.

Context
After doing some CPU profiling, I observed that using SliverMasonryGrid took up a lot more CPU time as compared to SliverList. I'm not entirely sure why this is the case, but my assumption is that SliverMasonryGrid has to do more calculations to determine how to position the corresponding elements.

Since non-tablet mode always displays the elements in a list rather than a grid, switching from SliverMasonryGrid to SliverList shouldn't have any perceived differences.

Issue Being Fixed

Issue Number: #1737

Screenshots / Recordings

Checklist

  • If a new package was added, did you ensure it uses an appropriate license and is actively maintained?
  • Did you use localized strings (and added appropriate descriptions) where applicable?
  • Did you add semanticLabels where applicable for accessibility?

Copy link
Member

@micahmo micahmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement!

@hjiangsu hjiangsu merged commit 69f7117 into develop Mar 13, 2025
1 check passed
@hjiangsu hjiangsu deleted the feat/post-list-sliver branch March 13, 2025 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants