{"action":"created","issue":{"url":"https://api.github.com/repos/instea/react-native-popup-menu/issues/45","repository_url":"https://api.github.com/repos/instea/react-native-popup-menu","labels_url":"https://api.github.com/repos/instea/react-native-popup-menu/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/instea/react-native-popup-menu/issues/45/comments","events_url":"https://api.github.com/repos/instea/react-native-popup-menu/issues/45/events","html_url":"https://github.com/instea/react-native-popup-menu/issues/45","id":259523560,"number":45,"title":"Very slow performance for large menus","user":{"login":"joncursi","id":4974609,"avatar_url":"https://avatars3.githubusercontent.com/u/4974609?v=4","gravatar_id":"","url":"https://api.github.com/users/joncursi","html_url":"https://github.com/joncursi","followers_url":"https://api.github.com/users/joncursi/followers","following_url":"https://api.github.com/users/joncursi/following{/other_user}","gists_url":"https://api.github.com/users/joncursi/gists{/gist_id}","starred_url":"https://api.github.com/users/joncursi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joncursi/subscriptions","organizations_url":"https://api.github.com/users/joncursi/orgs","repos_url":"https://api.github.com/users/joncursi/repos","events_url":"https://api.github.com/users/joncursi/events{/privacy}","received_events_url":"https://api.github.com/users/joncursi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-09-21T14:49:15Z","updated_at":"2017-12-06T16:29:53Z","closed_at":"2017-09-21T20:23:14Z","author_association":"NONE","body":"I am using a popup menu to pick a country from a list of 196 countries. I am rendering custom `ListItem` elements for each country for minor styling (country flag + name) but the result is each item is a medium sized component of nested `View`, styles, etc. Multiply that times 196 `ListItem`s and the popup menu takes 5 seconds to open - it's not necessarily trivial to compute in one shot. The big problem is that the delay is causing users to tap it multiple times because they think they mis-tapped due to no visual feedback due to the lag, which causes the menu to close before it opens. Really suffering on the UX-front.\r\n\r\nMy guess here is that this library is rendering all items in one shot, so in my case React has to render this massive tree when the user taps to open the menu. Can we render list items in batch? `FlatList` has an `initialNumToRender` prop: https://facebook.github.io/react-native/docs/flatlist.html#initialnumtorender\r\n\r\n* Version: I am on the latest version, but I've seen this issue in my app for pretty much all versions."},"comment":{"url":"https://api.github.com/repos/instea/react-native-popup-menu/issues/comments/349694396","html_url":"https://github.com/instea/react-native-popup-menu/issues/45#issuecomment-349694396","issue_url":"https://api.github.com/repos/instea/react-native-popup-menu/issues/45","id":349694396,"user":{"login":"sodik82","id":6132259,"avatar_url":"https://avatars1.githubusercontent.com/u/6132259?v=4","gravatar_id":"","url":"https://api.github.com/users/sodik82","html_url":"https://github.com/sodik82","followers_url":"https://api.github.com/users/sodik82/followers","following_url":"https://api.github.com/users/sodik82/following{/other_user}","gists_url":"https://api.github.com/users/sodik82/gists{/gist_id}","starred_url":"https://api.github.com/users/sodik82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sodik82/subscriptions","organizations_url":"https://api.github.com/users/sodik82/orgs","repos_url":"https://api.github.com/users/sodik82/repos","events_url":"https://api.github.com/users/sodik82/events{/privacy}","received_events_url":"https://api.github.com/users/sodik82/received_events","type":"User","site_admin":false},"created_at":"2017-12-06T16:29:53Z","updated_at":"2017-12-06T16:29:53Z","author_association":"OWNER","body":"(just for reference): with `0.10` it should be even easier: https://github.com/instea/react-native-popup-menu/blob/master/examples/FlatListExample.js"}}
{"actor":{"display_login":"sodik82"}}