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

Change transform style on Android to fix perf #819

Merged
merged 2 commits into from
Apr 24, 2023

Conversation

naqvitalha
Copy link
Collaborator

Description

resolves #751

Change transform style to fix inverted performance issue on Android.

Reviewers’ hat-rack 🎩

Messages sample should perform flawlessly.

Checklist

@naqvitalha naqvitalha force-pushed the fix-android-inverted-performance branch from a47ed5d to bb6c99c Compare April 20, 2023 19:30
@@ -28,7 +28,7 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"up": "bundle install && yarn fixture-up && yarn e2e-up && yarn build && yarn fixture-web-up",
"up": "bundle install && yarn fixture-up && yarn e2e-up && yarn build",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed due to some build issue. Not very important.

@@ -2,6 +2,7 @@ import { BaseItemAnimator } from "recyclerlistview";

const PlatformConfig = {
defaultDrawDistance: 250,
invertedTransformStyle: { transform: [{ rotate: "180deg" }] },
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Only changing on Android as this doesn't impact other platforms. This also reduces testing footprint.

@@ -2,6 +2,7 @@ import { BaseItemAnimator } from "recyclerlistview";

const PlatformConfig = {
defaultDrawDistance: 250,
invertedTransformStyle: { transform: [{ rotate: "180deg" }] },
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can add a comment for why we're doing this and link to the original issues. Might be surprising to see this down the road.

@naqvitalha naqvitalha merged commit daad737 into main Apr 24, 2023
13 checks passed
@naqvitalha naqvitalha deleted the fix-android-inverted-performance branch April 24, 2023 16:32
@KYZNCODE-Sebastian-Roese

Fixed the performance issue for me, so thanks a lot.
BUT: Now my inverted FlashList shows the scrollbar on the left side of the screen.

Anyone else sees the same behavior?

@irisjae
Copy link

irisjae commented Oct 18, 2023

@KYZNCODE-Sebastian-Roese Indeed, the upstream react-native patch (facebook/react-native@3dd816c) suggests that we should pass isInvertedVirtualizedList to the inner ScrollView when using inverted lists on Android. This can be achieved by adding overrideProps={{ isInvertedVirtualizedList: true }} to the FlashList.

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.

Inverted scroll super laggy on Android
4 participants