{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1063","labels_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1063/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1063/comments","events_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1063/events","html_url":"https://github.com/angular-ui/angular-google-maps/issues/1063","id":53860716,"number":1063,"title":"Total performance degradation when displaying markers","user":{"login":"markotomictoma","id":1753169,"avatar_url":"https://avatars.githubusercontent.com/u/1753169?v=3","gravatar_id":"","url":"https://api.github.com/users/markotomictoma","html_url":"https://github.com/markotomictoma","followers_url":"https://api.github.com/users/markotomictoma/followers","following_url":"https://api.github.com/users/markotomictoma/following{/other_user}","gists_url":"https://api.github.com/users/markotomictoma/gists{/gist_id}","starred_url":"https://api.github.com/users/markotomictoma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markotomictoma/subscriptions","organizations_url":"https://api.github.com/users/markotomictoma/orgs","repos_url":"https://api.github.com/users/markotomictoma/repos","events_url":"https://api.github.com/users/markotomictoma/events{/privacy}","received_events_url":"https://api.github.com/users/markotomictoma/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-01-09T11:56:12Z","updated_at":"2015-01-09T20:36:46Z","closed_at":null,"body":"I am new to this framework and I am also not that good with javascript so it can be that I am doing something wrong but so far couldn't figure that out. I made a simple app with array of 1000 objects with lat/long that are stored(hardcoded) in the factory(service). Every time when the pin is moved, I take the new pin's coords and search array for objects that are in radius of 50 Km. Resulted array is then bound to markers and displayed on the map. Number of objects in the resulted array is never bigger than 100. However, even with 50 markers chrome/ff/ie takes 30+ seconds to display. \r\n\r\nI did some debugging and figure out that almost all time goes to this line of code:\r\nthis.clonedModel = _.clone(this.model, true); (angular-google-maps.js, method MarkerChildModel)\r\n\r\nTo me, it looks like that for every marker that should be displayed on the map, whole application model is being cloned. Lodash baseClone method is being executed thousands of time for only a couple of markers. Unfortunately, I am simply not capable of figuring out how to solve this. \r\n\r\nAnybody has a clue?\r\n\r\n "},"comment":{"url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/comments/69394998","html_url":"https://github.com/angular-ui/angular-google-maps/issues/1063#issuecomment-69394998","issue_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1063","id":69394998,"user":{"login":"kieferhagin","id":2198686,"avatar_url":"https://avatars.githubusercontent.com/u/2198686?v=3","gravatar_id":"","url":"https://api.github.com/users/kieferhagin","html_url":"https://github.com/kieferhagin","followers_url":"https://api.github.com/users/kieferhagin/followers","following_url":"https://api.github.com/users/kieferhagin/following{/other_user}","gists_url":"https://api.github.com/users/kieferhagin/gists{/gist_id}","starred_url":"https://api.github.com/users/kieferhagin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kieferhagin/subscriptions","organizations_url":"https://api.github.com/users/kieferhagin/orgs","repos_url":"https://api.github.com/users/kieferhagin/repos","events_url":"https://api.github.com/users/kieferhagin/events{/privacy}","received_events_url":"https://api.github.com/users/kieferhagin/received_events","type":"User","site_admin":false},"created_at":"2015-01-09T20:36:46Z","updated_at":"2015-01-09T20:36:46Z","body":"Gotcha. That line doesn't appear to be the issue, at least not for me. I think we may have two different issues here."}}