{"action":"created","issue":{"url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/835","repository_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps","labels_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/835/labels{/name}","comments_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/835/comments","events_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/835/events","html_url":"https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/835","id":130497286,"number":835,"title":"Performance problems when adding many markers.","user":{"login":"atannus","id":669339,"avatar_url":"https://avatars.githubusercontent.com/u/669339?v=3","gravatar_id":"","url":"https://api.github.com/users/atannus","html_url":"https://github.com/atannus","followers_url":"https://api.github.com/users/atannus/followers","following_url":"https://api.github.com/users/atannus/following{/other_user}","gists_url":"https://api.github.com/users/atannus/gists{/gist_id}","starred_url":"https://api.github.com/users/atannus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atannus/subscriptions","organizations_url":"https://api.github.com/users/atannus/orgs","repos_url":"https://api.github.com/users/atannus/repos","events_url":"https://api.github.com/users/atannus/events{/privacy}","received_events_url":"https://api.github.com/users/atannus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2016-02-01T21:58:12Z","updated_at":"2016-03-03T20:57:44Z","closed_at":null,"body":"I'm proposing a patch to the `PluginMarker.java` file that will greatly improve the performance when adding hundreds of markers to the map.\r\n\r\nI propose the creation of a `createMarkers` method (note the plural), which will take the same marker definition as does the currently available `createMarker`, except for the fact they'll be in an array, therefore allowing the creation of multiple markers with a single over-the-bridge request. Naturally, the `callback` has to return an array of markers, instead of a single marker.\r\n\r\nA  `private createMarker_` method is to be called by `createMarkers`. This does not break the current API, and the current `createMarker` method  can be refactored to simply call the private version with its argument in an array.\r\n\r\nI have already implemented marker caching and marker pre-loading which on top of that will drastically reduce memory consumption and prevent leaks.\r\n\r\nThis is where my understanding of this project ends. I don't know what my constraints as a developer are:\r\n\r\n- Are APIs frozen?\r\n- Are they meant to mimic their respective native environments?\r\n- Or abstract them away? (This preferred, imho.)\r\n- Do iOS and Android APIs diverge today?\r\n\r\nI'm seeing fantastic performance with these improvements, I'd really like to contribute them.\r\n\r\nThanks a lot for the help."},"comment":{"url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/comments/191959465","html_url":"https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/835#issuecomment-191959465","issue_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/835","id":191959465,"user":{"login":"atannus","id":669339,"avatar_url":"https://avatars.githubusercontent.com/u/669339?v=3","gravatar_id":"","url":"https://api.github.com/users/atannus","html_url":"https://github.com/atannus","followers_url":"https://api.github.com/users/atannus/followers","following_url":"https://api.github.com/users/atannus/following{/other_user}","gists_url":"https://api.github.com/users/atannus/gists{/gist_id}","starred_url":"https://api.github.com/users/atannus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atannus/subscriptions","organizations_url":"https://api.github.com/users/atannus/orgs","repos_url":"https://api.github.com/users/atannus/repos","events_url":"https://api.github.com/users/atannus/events{/privacy}","received_events_url":"https://api.github.com/users/atannus/received_events","type":"User","site_admin":false},"created_at":"2016-03-03T20:57:43Z","updated_at":"2016-03-03T20:57:43Z","body":"I'm on this now.\nIs there a suggested development flow?\nIDE?\nShould I edit the plugin while installed within a project or\nchange->(re)install->test?\nThanks.\n\n\nOn Thu, Mar 3, 2016 at 10:44 AM, Andre Tannus <andre.tannus@gmail.com>\nwrote:\n\n> I'll see what I can do.\n>\n> On Thu, Mar 3, 2016 at 10:41 AM, Christian <notifications@github.com>\n> wrote:\n>\n>> It appears so. There is a clusterer branch but I'm unsure about how\n>> complete that is. It would be great if you could commit your changes to\n>> your fork (and maybe even open a pull request) if you want to share your\n>> work.\n>>\n>> —\n>> Reply to this email directly or view it on GitHub\n>> <https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/835#issuecomment-191764409>\n>> .\n>>\n>\n>\n>\n> --\n> André Tannús | Epungo | +55 11 2389-4360\n> We are a layer\n>\n\n\n\n-- \nAndré Tannús | Epungo | +55 11 2389-4360\nWe are a layer\n"}}