Dale Harvey

By: Dale Harvey
Published: 05 January 2017

Happy New Year to all! With a new year comes a new PouchDB release. For a full changelog since 6.1.0, please see the releases page but for a look at our new years resolutions then here goes:

Include id's in bulkDocs response

Ben Nadel pointed out that it was a lot of work for users to figure out the result of their individual documents writes in a bulkDocs request, so thanks to Will Holley we now keep track of them.

Play nicer with proxy servers

A lot people use PouchDB with a CouchDB server that is behind a proxy, sometimes these proxies do not behave exactly as CouchDB does so we have new fixes to improve that:

  1. (#6089) - Don't add a default heartbeat parameter to non live changes() requests. Thanks to Artur Nowak.
  2. (#5501) - Fall back from bulkGet on any error (not just 4XX). Thanks to Will Holley.

Be faster and use less memory

Nolan Lawson has spent a lot of time profiling PouchDB (keep on the look out for an upcoming blog post) but in the meantime these changes include: Use native Map/Set where possible, Use Object.assign instead of js-extend and use batched cursors (getAll / GetAllKeys) when fetching multiple documents from IndexedDB.

Be consistent in Worker threads

Last years PouchDB had a bug in an optimisation that could produce different results across worker threads or the same database in different tabs, 2017 PouchDB has had that memory optimisation replaced with a thread safe version. Again many thanks to Nolan.

Full changelog

New features

  • #6039 - include id in all bulk_docs results

Bug fixes and performance improvements

  • #5987 - remove references to "db" option
  • #6002 - remove excessive debug dep
  • #5962 - fix broken verify-bundle-size.sh script
  • #5990 - Use native Map/Set
  • #6012 - replace js-extend with Object.assign
  • #6018 - simplify processNextBatch in mapreduce
  • #5501 - fall back from bulk_get on any error
  • #6027 - remove unused utils.extend
  • #6015 - use Map and Set in mapreduce
  • #6016 - separate funcs for map vs reduce
  • #6031 - faster IDB changes() with batched cursor
  • #5930 - use travis_retry
  • #6055 - remove docCount optimization from IDB
  • #6055 - remove docCount optimization from WebSQL
  • #6089 - Don't add default heartbeat to non-live _changes requests
  • #6068 - safely reimplement IDB docCount optimization
  • #6096 - clean up and reduce memory usage of mapreduce
  • #6099 - use Map/Set in viewCleanup()
  • #6101 - add perf test for building secondary indexes

Get in touch

As always, we welcome feedback from the community and would love to hear what you think of this release as well as PouchDB's future direction. Please don't hesitate to file issues or get in touch. And of course, a big thanks to all of our new and existing contributors!