{"action":"created","issue":{"url":"https://api.github.com/repos/techfort/LokiJS/issues/295","labels_url":"https://api.github.com/repos/techfort/LokiJS/issues/295/labels{/name}","comments_url":"https://api.github.com/repos/techfort/LokiJS/issues/295/comments","events_url":"https://api.github.com/repos/techfort/LokiJS/issues/295/events","html_url":"https://github.com/techfort/LokiJS/issues/295","id":121523727,"number":295,"title":"Slow refresh of angularjs select when using indexeddb adapter","user":{"login":"EduardoJimenez","id":1971010,"avatar_url":"https://avatars.githubusercontent.com/u/1971010?v=3","gravatar_id":"","url":"https://api.github.com/users/EduardoJimenez","html_url":"https://github.com/EduardoJimenez","followers_url":"https://api.github.com/users/EduardoJimenez/followers","following_url":"https://api.github.com/users/EduardoJimenez/following{/other_user}","gists_url":"https://api.github.com/users/EduardoJimenez/gists{/gist_id}","starred_url":"https://api.github.com/users/EduardoJimenez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EduardoJimenez/subscriptions","organizations_url":"https://api.github.com/users/EduardoJimenez/orgs","repos_url":"https://api.github.com/users/EduardoJimenez/repos","events_url":"https://api.github.com/users/EduardoJimenez/events{/privacy}","received_events_url":"https://api.github.com/users/EduardoJimenez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-10T16:22:04Z","updated_at":"2015-12-11T13:07:14Z","closed_at":null,"body":"I have a 1,500+ rows 20+ properties collection which I populate from a restful JSon webservice, when I create the database and collection the first time, an angularjs select populates inmedialelly, but when I refresh the page, with the collection saved, it takes 30+ seconds for the select to show data.\r\n\r\nWhen not using the indexeddb adapter, the select is shown with data inmediatelly.\r\n\r\n    $scope.clientes = [];\r\n    var idb = new LokiIndexedAdapter('ruteo');\r\n    var db = new Loki('SGABaseMovil', { adapter: idb });\r\n    db.loadDatabase({}, function () {\r\n        $scope.dbclientes = db.getCollection('clientes');\r\n        if ($scope.dbclientes === null) {\r\n            $scope.dbclientes = db.addCollection('clientes', { unique: ['cliente']});\r\n            $http({method: 'GET', url: 'http://localhost/SGA/CRC/clientes/todo'}).\r\n               then(function (retorno) {\r\n                   $scope.dbclientes.removeDataOnly();\r\n                   $scope.dbclientes.insert(retorno.data);\r\n                   db.saveDatabase();\r\n             });\r\n        }\r\n        $scope.clientes = $scope.dbclientes.data;\r\n    });\r\n\r\nThe select is bound to $scope.clientes as such:\r\n\r\n    <select id=\"selcliente\" ng-model=\"selcliente\" ng-options=\"c.clientenomb for c in clientes track by c.cliente\"> \r\n    </select>\r\n"},"comment":{"url":"https://api.github.com/repos/techfort/LokiJS/issues/comments/163932785","html_url":"https://github.com/techfort/LokiJS/issues/295#issuecomment-163932785","issue_url":"https://api.github.com/repos/techfort/LokiJS/issues/295","id":163932785,"user":{"login":"EduardoJimenez","id":1971010,"avatar_url":"https://avatars.githubusercontent.com/u/1971010?v=3","gravatar_id":"","url":"https://api.github.com/users/EduardoJimenez","html_url":"https://github.com/EduardoJimenez","followers_url":"https://api.github.com/users/EduardoJimenez/followers","following_url":"https://api.github.com/users/EduardoJimenez/following{/other_user}","gists_url":"https://api.github.com/users/EduardoJimenez/gists{/gist_id}","starred_url":"https://api.github.com/users/EduardoJimenez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EduardoJimenez/subscriptions","organizations_url":"https://api.github.com/users/EduardoJimenez/orgs","repos_url":"https://api.github.com/users/EduardoJimenez/repos","events_url":"https://api.github.com/users/EduardoJimenez/events{/privacy}","received_events_url":"https://api.github.com/users/EduardoJimenez/received_events","type":"User","site_admin":false},"created_at":"2015-12-11T13:07:14Z","updated_at":"2015-12-11T13:07:14Z","body":"Thanks very much for your response (almost synchronous :) ) and for your tips to debug.\r\n\r\nYes, I am using the latest version of all js components, Loki and Angular and Loki-Angular.\r\n\r\nAs you say, I've come to determine that the problem is in the refreshing of the select control, when I click once on the empty control and click outside, it shows the data.  Again, if I don´t use the adapter, this does not happen.\r\n\r\nWho do you suggest I take this issue to?\r\n\r\n"}}