alexstyl / compose-tinder-card

A Jetpack Compose Modifier that enables Tinder-like card gestures.
Apache License 2.0
165 stars 13 forks source link

Optimize View Loading: Reload Only Necessary ProfileCard on Swipe #11

Open venkatselva8 opened 5 months ago

venkatselva8 commented 5 months ago

I have identified an issue in the sample project. I added logs during the loading of ProfileCard, CircleButton, and Box. Currently, when you swipe in any direction, all these views reload. Specifically, the ProfileCard reloads the number of remaining profiles to display.

I believe the optimal approach is to load only the ProfileCard that needs to be shown, similar to how a RecyclerView loads a specific set of items that are going to be displayed. This would enhance the performance and prevent unnecessary reloading of views.