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

fix(android): custom maker performance improvements when view tracking #4969

Merged

Conversation

jared-ca
Copy link
Contributor

@jared-ca jared-ca commented Feb 15, 2024

This issue was identified by profiling the app when the performance dropped to 10FPS.

Does any other open PR do the same thing?

No

What issue is this PR fixing?

#4968

How did you test this PR?

This change was tested on a Pixel 7 Pro using the sample code from the attached issue. With this change in place adding 20 markers sequentially has no performance impact and the app could maintain 120fps. ( Without the change the FPS dropped to about 10 ).

I also added some code to change the contents of the custom view and verified that it was updating on the map.

@salah-ghanim
Copy link
Collaborator

@jan-kozinski @mateki0 can you guys please take the time to review / test

@mateki0
Copy link
Collaborator

mateki0 commented Feb 28, 2024

I think it works as it should. Without this fix adding about 25 markers caused fps drop to ~1 and sometimes map is freezed on my device. With it it still lose some fps but it's much better and map is usable. I have also checked other Marker related examples and it looks like everything is fine (Animated marker position, Postion marker wtih z index, Massive custom markers).

However with tracksViewChanges={false} it works fine with and without fix. But we probably don't want to put this limitation on users longer.

@salah-ghanim salah-ghanim merged commit f30c9d7 into react-native-maps:master Mar 10, 2024
4 checks passed
react-native-maps-bot pushed a commit that referenced this pull request Mar 10, 2024
## [1.11.1](v1.11.0...v1.11.1) (2024-03-10)

### Bug Fixes

* **android:** custom maker performance improvements when view tracking ([#4969](#4969)) ([f30c9d7](f30c9d7))
@react-native-maps-bot
Copy link
Collaborator

🎉 This PR is included in version 1.11.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Super-CodeKing added a commit to Super-CodeKing/react_native_map that referenced this pull request Apr 26, 2024
## [1.11.1](react-native-maps/react-native-maps@v1.11.0...v1.11.1) (2024-03-10)

### Bug Fixes

* **android:** custom maker performance improvements when view tracking ([#4969](react-native-maps/react-native-maps#4969)) ([f30c9d7](react-native-maps/react-native-maps@f30c9d7))
fairskyDev0201 pushed a commit to fairskyDev0201/react-native-maps that referenced this pull request Apr 29, 2024
## [1.11.1](react-native-maps/react-native-maps@v1.11.0...v1.11.1) (2024-03-10)

### Bug Fixes

* **android:** custom maker performance improvements when view tracking ([#4969](react-native-maps/react-native-maps#4969)) ([f30c9d7](react-native-maps/react-native-maps@f30c9d7))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants