{"action":"created","issue":{"url":"https://api.github.com/repos/react-community/react-native-maps/issues/1031","repository_url":"https://api.github.com/repos/react-community/react-native-maps","labels_url":"https://api.github.com/repos/react-community/react-native-maps/issues/1031/labels{/name}","comments_url":"https://api.github.com/repos/react-community/react-native-maps/issues/1031/comments","events_url":"https://api.github.com/repos/react-community/react-native-maps/issues/1031/events","html_url":"https://github.com/react-community/react-native-maps/issues/1031","id":205838290,"node_id":"MDU6SXNzdWUyMDU4MzgyOTA=","number":1031,"title":"Custom marker in google map causes high CPU load on iOS","user":{"login":"vinceyuan","id":1109524,"node_id":"MDQ6VXNlcjExMDk1MjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/1109524?v=4","gravatar_id":"","url":"https://api.github.com/users/vinceyuan","html_url":"https://github.com/vinceyuan","followers_url":"https://api.github.com/users/vinceyuan/followers","following_url":"https://api.github.com/users/vinceyuan/following{/other_user}","gists_url":"https://api.github.com/users/vinceyuan/gists{/gist_id}","starred_url":"https://api.github.com/users/vinceyuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinceyuan/subscriptions","organizations_url":"https://api.github.com/users/vinceyuan/orgs","repos_url":"https://api.github.com/users/vinceyuan/repos","events_url":"https://api.github.com/users/vinceyuan/events{/privacy}","received_events_url":"https://api.github.com/users/vinceyuan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":45,"created_at":"2017-02-07T09:56:00Z","updated_at":"2018-10-12T17:37:14Z","closed_at":"2018-10-12T12:56:43Z","author_association":"CONTRIBUTOR","body":"Even if there is only one custom marker in google map, the app uses a LOT of CPU on iOS. It happens on both simulator and device with debug/release builds.\r\n\r\nYou can see in the screenshot of the [demo project](https://github.com/vinceyuan/CustomMarkerIssueDemo) I made, when we use custom marker, the CPU usage jumps from 0.8% to 62%. I also tried creating a custom marker in a native iOS app using Google Maps SDK for iOS. It does not use much CPU.\r\n\r\nThe following two ways of defining a custom marker do not make any difference. Both of them use a lot of CPU.\r\n```\r\n<MapView.Marker coordinate={coordinate} anchor={{x: 0.65, y: 1}}>\r\n  <Image source={imageSrc}/>\r\n</MapView.Marker>\r\n```\r\n\r\n```\r\n<MapView.Marker coordinate={coordinate} anchor={{x: 0.65, y: 1}} image={imageSrc}/>\r\n```\r\n\r\n![Screenshot](https://github.com/vinceyuan/CustomMarkerIssueDemo/raw/master/CustomMarkerIssueDemo.gif)\r\n\r\nI tried to use Instruments to profile the app. For unknown reason, something (the custom marker i guess) **keeps redrawing**.\r\n\r\n![Screenshot](https://github.com/vinceyuan/CustomMarkerIssueDemo/raw/master/Profile.png)\r\n\r\nEnvironment:\r\nreact-native-maps: 0.13.0\r\nreact-native: ^0.40.0\r\nmap provider: google\r\nOS: iOS\r\n\r\nAnother person encountered the same issue. https://github.com/airbnb/react-native-maps/issues/741#issuecomment-263400988"},"comment":{"url":"https://api.github.com/repos/react-community/react-native-maps/issues/comments/429403303","html_url":"https://github.com/react-community/react-native-maps/issues/1031#issuecomment-429403303","issue_url":"https://api.github.com/repos/react-community/react-native-maps/issues/1031","id":429403303,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTQwMzMwMw==","user":{"login":"rborn","id":406409,"node_id":"MDQ6VXNlcjQwNjQwOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/406409?v=4","gravatar_id":"","url":"https://api.github.com/users/rborn","html_url":"https://github.com/rborn","followers_url":"https://api.github.com/users/rborn/followers","following_url":"https://api.github.com/users/rborn/following{/other_user}","gists_url":"https://api.github.com/users/rborn/gists{/gist_id}","starred_url":"https://api.github.com/users/rborn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rborn/subscriptions","organizations_url":"https://api.github.com/users/rborn/orgs","repos_url":"https://api.github.com/users/rborn/repos","events_url":"https://api.github.com/users/rborn/events{/privacy}","received_events_url":"https://api.github.com/users/rborn/received_events","type":"User","site_admin":false},"created_at":"2018-10-12T17:37:14Z","updated_at":"2018-10-12T17:37:14Z","author_association":"COLLABORATOR","body":"@aksonov you need to manage `tracksViewChanges` so you avoid this. let me know if you need help with that :)"}}
{"actor":{"display_login":"rborn"}}