{"action":"created","issue":{"url":"https://api.github.com/repos/adapt-it/adapt-it-mobile/issues/72","labels_url":"https://api.github.com/repos/adapt-it/adapt-it-mobile/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/adapt-it/adapt-it-mobile/issues/72/comments","events_url":"https://api.github.com/repos/adapt-it/adapt-it-mobile/issues/72/events","html_url":"https://github.com/adapt-it/adapt-it-mobile/issues/72","id":76870242,"number":72,"title":"Slow responses from SQLite on Android","user":{"login":"eb1","id":1458944,"avatar_url":"https://avatars.githubusercontent.com/u/1458944?v=3","gravatar_id":"","url":"https://api.github.com/users/eb1","html_url":"https://github.com/eb1","followers_url":"https://api.github.com/users/eb1/followers","following_url":"https://api.github.com/users/eb1/following{/other_user}","gists_url":"https://api.github.com/users/eb1/gists{/gist_id}","starred_url":"https://api.github.com/users/eb1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eb1/subscriptions","organizations_url":"https://api.github.com/users/eb1/orgs","repos_url":"https://api.github.com/users/eb1/repos","events_url":"https://api.github.com/users/eb1/events{/privacy}","received_events_url":"https://api.github.com/users/eb1/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/adapt-it/adapt-it-mobile/labels/Android","name":"Android","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/adapt-it/adapt-it-mobile/milestones/3","html_url":"https://github.com/adapt-it/adapt-it-mobile/milestones/Milestone%200.30","labels_url":"https://api.github.com/repos/adapt-it/adapt-it-mobile/milestones/3/labels","id":581623,"number":3,"title":"Milestone 0.30","description":"Alpha release - critical features completed.","creator":{"login":"eb1","id":1458944,"avatar_url":"https://avatars.githubusercontent.com/u/1458944?v=3","gravatar_id":"","url":"https://api.github.com/users/eb1","html_url":"https://github.com/eb1","followers_url":"https://api.github.com/users/eb1/followers","following_url":"https://api.github.com/users/eb1/following{/other_user}","gists_url":"https://api.github.com/users/eb1/gists{/gist_id}","starred_url":"https://api.github.com/users/eb1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eb1/subscriptions","organizations_url":"https://api.github.com/users/eb1/orgs","repos_url":"https://api.github.com/users/eb1/repos","events_url":"https://api.github.com/users/eb1/events{/privacy}","received_events_url":"https://api.github.com/users/eb1/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":12,"state":"open","created_at":"2014-02-26T22:19:06Z","updated_at":"2015-06-26T14:33:31Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-05-15T21:58:13Z","updated_at":"2015-06-26T14:33:31Z","closed_at":"2015-06-26T14:33:31Z","body":"Currently we have the model data for book, chapter, sourcephrase and target unit (Knowledge Base) stored in a SQLite database for AIM. This works fairly well for browser and iOS. On Android however I'm getting some weird results when a query to the database doesn't return right away, or returns 0 for the book / chapter counts. This might be due to background threads not finishing their processing by the time AIM requests information?\r\n\r\nSteps to reproduce:\r\n\r\n1. Copy over a document or two to the tablet\r\n2. Launch AIM for the first time\r\n3. Create a new project\r\n4. Import the document you copied over to the tablet\r\n5. Back in the main window, click the project.\r\n\r\n--> you should see 4 links: Settings, Import, Search and Adapt. Instead on Android I'm only seeing the first two (Settings and Import). This only happens if AIM doesn't think there are any documents imported."},"comment":{"url":"https://api.github.com/repos/adapt-it/adapt-it-mobile/issues/comments/115709697","html_url":"https://github.com/adapt-it/adapt-it-mobile/issues/72#issuecomment-115709697","issue_url":"https://api.github.com/repos/adapt-it/adapt-it-mobile/issues/72","id":115709697,"user":{"login":"eb1","id":1458944,"avatar_url":"https://avatars.githubusercontent.com/u/1458944?v=3","gravatar_id":"","url":"https://api.github.com/users/eb1","html_url":"https://github.com/eb1","followers_url":"https://api.github.com/users/eb1/followers","following_url":"https://api.github.com/users/eb1/following{/other_user}","gists_url":"https://api.github.com/users/eb1/gists{/gist_id}","starred_url":"https://api.github.com/users/eb1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eb1/subscriptions","organizations_url":"https://api.github.com/users/eb1/orgs","repos_url":"https://api.github.com/users/eb1/repos","events_url":"https://api.github.com/users/eb1/events{/privacy}","received_events_url":"https://api.github.com/users/eb1/received_events","type":"User","site_admin":false},"created_at":"2015-06-26T14:33:31Z","updated_at":"2015-06-26T14:33:31Z","body":"Update on this issue:\r\n\r\nThe original complaint in this issue (unable to see the Search / Adapt links after importing documents) has been addressed by doing the following:\r\n\r\n- Moving the Books collection into LocalStorage for faster retrieval (there are not that many Book items, so this won't run into the 5MB limit on LocalStorage data)\r\n- Asychronously batching the creation of SourcePhrase objects so that there are less calls to the sql INSERT api\r\n- Responding to a \"done\" callback in the import documents UI by only enabling the OK button when the objects are truly done\r\n\r\nThere is another problem I've uncovered with large data sets that I'll write up in a separate issue, but it looks like the problem described in this one can be considered addressed."}}