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

JS fps drop and stutters during image load #34

Closed
ehsan6sha opened this issue Jun 7, 2021 · 6 comments · Fixed by #42
Closed

JS fps drop and stutters during image load #34

ehsan6sha opened this issue Jun 7, 2021 · 6 comments · Fixed by #42
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed High Priority High priority. Only one open and unassigned high priority is allowed at each time.
Projects
Milestone

Comments

@ehsan6sha
Copy link
Member

When images are being loaded in chunk, between each load a lot of drop happens in JS as well as stutters. This causes the app to become unresponsive during load. one side-effect is if user scrolls during these times, it jumps around since engine cannot properly determine the last position as it was busy.

@ehsan6sha ehsan6sha added bug Something isn't working High Priority High priority. Only one open and unassigned high priority is allowed at each time. and removed High Priority High priority. Only one open and unassigned high priority is allowed at each time. labels Jun 7, 2021
@ehsan6sha
Copy link
Member Author

Stutters and frame drops were due to a couple of console.logs, that is fixed with commit below:
732da74

It is not performant without major drop

@ehsan6sha
Copy link
Member Author

When remote Debug JS is on, there is no performance drop, otherwise, it drops.

@ehsan6sha ehsan6sha reopened this Jun 7, 2021
@ehsan6sha
Copy link
Member Author

ehsan6sha commented Jun 8, 2021

RecyclerListView LaoutProvider is called on each screen TAP, which means the component re-renders at each TAP, which is causing a huge recalculation every time and is unexpected. Looking to find the root cause. Most probabely preventing this, would improve performance significantly

@ehsan6sha ehsan6sha self-assigned this Jun 8, 2021
@ehsan6sha ehsan6sha added this to Not started in Development via automation Jun 8, 2021
@ehsan6sha ehsan6sha pinned this issue Jun 8, 2021
@ehsan6sha ehsan6sha moved this from Not started to In progress in Development Jun 8, 2021
@ehsan6sha
Copy link
Member Author

Could improve this a little by adding memo to components in commit ea3b818, however, root cause(excess re-render of RenderPhotos) is still not addressed.

@ehsan6sha ehsan6sha added the help wanted Extra attention is needed label Jun 8, 2021
This was referenced Jun 8, 2021
@ehsan6sha
Copy link
Member Author

Excessive states are causing re-renders. Applying a fix by:
1-switching to recoil
2- removing unnecessary states

@ehsan6sha
Copy link
Member Author

I am switching state management to recoil and switching animation to reanimated. So far the switched components has shown an excellent performance. It probably takes a few more days, but the outcome would be a lightning fast application. Work is being done in branch "reanimated-recyclerlistview"

Development automation moved this from In progress to Done Jun 14, 2021
@ehsan6sha ehsan6sha unpinned this issue Jun 21, 2021
@gitaaron gitaaron added this to the fotos v0.1.0 milestone Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed High Priority High priority. Only one open and unassigned high priority is allowed at each time.
Projects
Development

Successfully merging a pull request may close this issue.

2 participants