{"action":"created","issue":{"url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3921","labels_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3921/labels{/name}","comments_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3921/comments","events_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3921/events","html_url":"https://github.com/pouchdb/pouchdb/issues/3921","id":84019708,"number":3921,"title":"PouchDB takes 10-15 seconds to update 5,000 documents","user":{"login":"nolanlawson","id":283842,"avatar_url":"https://avatars.githubusercontent.com/u/283842?v=3","gravatar_id":"","url":"https://api.github.com/users/nolanlawson","html_url":"https://github.com/nolanlawson","followers_url":"https://api.github.com/users/nolanlawson/followers","following_url":"https://api.github.com/users/nolanlawson/following{/other_user}","gists_url":"https://api.github.com/users/nolanlawson/gists{/gist_id}","starred_url":"https://api.github.com/users/nolanlawson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nolanlawson/subscriptions","organizations_url":"https://api.github.com/users/nolanlawson/orgs","repos_url":"https://api.github.com/users/nolanlawson/repos","events_url":"https://api.github.com/users/nolanlawson/events{/privacy}","received_events_url":"https://api.github.com/users/nolanlawson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-02T13:23:16Z","updated_at":"2015-06-02T13:33:15Z","closed_at":null,"body":"Prompted by [a SO question](http://stackoverflow.com/questions/30536760/pouchdb-about-3x-slower-inserting-4800-documents-over-websql/30560249).\r\n\r\nNo combination can update these docs faster than 15 seconds. I don't know if we've reached the theoretical limit of IndexedDB/WebSQL or the CouchDB revision tree model, but I hope not. I have not profiled yet.\r\n\r\n[Live test](https://gist.github.com/nolanlawson/84028dcfcdc7a0e340b7).\r\n\r\nResults for IndexedDB, no auto-compaction (Chrome 43):\r\n\r\n```\r\ninitial bulkDocs: 13147.961ms\r\n(index):58 allDocs: 4159.247ms\r\n(index):65 bulkDocs (update): 16072.757ms\r\n(index):58 allDocs: 3765.193ms\r\n(index):65 bulkDocs (update): 14294.470ms\r\n(index):58 allDocs: 3508.268ms\r\n(index):65 bulkDocs (update): 18408.058ms\r\n(index):58 allDocs: 4030.973ms\r\n(index):65 bulkDocs (update): 15931.974ms\r\n(index):58 allDocs: 4018.197ms\r\n(index):65 bulkDocs (update): 17534.399ms\r\n```\r\n\r\nResults for WebSQL, no auto-compaction (Chrome 43):\r\n\r\n```\r\ninitial bulkDocs: 9348.997ms\r\n(index):58 allDocs: 119.222ms\r\n(index):65 bulkDocs (update): 11301.562ms\r\n(index):58 allDocs: 125.094ms\r\n(index):65 bulkDocs (update): 13029.120ms\r\n(index):58 allDocs: 188.741ms\r\n(index):65 bulkDocs (update): 11270.408ms\r\n(index):58 allDocs: 159.362ms\r\n(index):65 bulkDocs (update): 11863.117ms\r\n(index):58 allDocs: 161.994ms\r\n(index):65 bulkDocs (update): 12099.767ms\r\n```"},"comment":{"url":"https://api.github.com/repos/pouchdb/pouchdb/issues/comments/107954085","html_url":"https://github.com/pouchdb/pouchdb/issues/3921#issuecomment-107954085","issue_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3921","id":107954085,"user":{"login":"nolanlawson","id":283842,"avatar_url":"https://avatars.githubusercontent.com/u/283842?v=3","gravatar_id":"","url":"https://api.github.com/users/nolanlawson","html_url":"https://github.com/nolanlawson","followers_url":"https://api.github.com/users/nolanlawson/followers","following_url":"https://api.github.com/users/nolanlawson/following{/other_user}","gists_url":"https://api.github.com/users/nolanlawson/gists{/gist_id}","starred_url":"https://api.github.com/users/nolanlawson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nolanlawson/subscriptions","organizations_url":"https://api.github.com/users/nolanlawson/orgs","repos_url":"https://api.github.com/users/nolanlawson/repos","events_url":"https://api.github.com/users/nolanlawson/events{/privacy}","received_events_url":"https://api.github.com/users/nolanlawson/received_events","type":"User","site_admin":false},"created_at":"2015-06-02T13:33:14Z","updated_at":"2015-06-02T13:33:14Z","body":"Also: wow, WebSQL allDocs is 40 times faster than IndexedDB allDocs."}}