{"action":"opened","issue":{"url":"https://api.github.com/repos/wordpress-mobile/WordPress-Android/issues/3096","labels_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Android/issues/3096/labels{/name}","comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Android/issues/3096/comments","events_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Android/issues/3096/events","html_url":"https://github.com/wordpress-mobile/WordPress-Android/issues/3096","id":103042993,"number":3096,"title":"Janky masterbar","user":{"login":"nbradbury","id":3903757,"avatar_url":"https://avatars.githubusercontent.com/u/3903757?v=3","gravatar_id":"","url":"https://api.github.com/users/nbradbury","html_url":"https://github.com/nbradbury","followers_url":"https://api.github.com/users/nbradbury/followers","following_url":"https://api.github.com/users/nbradbury/following{/other_user}","gists_url":"https://api.github.com/users/nbradbury/gists{/gist_id}","starred_url":"https://api.github.com/users/nbradbury/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nbradbury/subscriptions","organizations_url":"https://api.github.com/users/nbradbury/orgs","repos_url":"https://api.github.com/users/nbradbury/repos","events_url":"https://api.github.com/users/nbradbury/events{/privacy}","received_events_url":"https://api.github.com/users/nbradbury/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wordpress-mobile/WordPress-Android/labels/Calypsofication","name":"Calypsofication","color":"bfd4f2"},{"url":"https://api.github.com/repos/wordpress-mobile/WordPress-Android/labels/Masterbar","name":"Masterbar","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-25T15:07:08Z","updated_at":"2015-08-25T15:07:08Z","closed_at":null,"body":"On all but the fastest devices, switching between tabs in the masterbar can be janky. This appears to be primarily due to the creation of the reader & notification fragments as the user switches tabs.\r\n\r\nOne possibility is to use a `FragmentPagerAdapter` instead of a `FragmentStatePagerAdapter`, then use `setOffscreenPagelimit(3)` on the ViewPager to keep all the fragments in memory. This is likely to cause OOM problems on older devices, though.\r\n\r\nSo rather than do that, we need to investigate why the creation of the reader and notification fragments is so expensive. My guess is it's due partly to hitting the database on the main thread, although much of the problem is likely caused by the complex views which populate the recyclers on both those fragments."}}