layout: post
title: PouchDB 3.2.1: You can always be faster
author: Nolan Lawson
A humble release to ring in the new year, PouchDB 3.2.1 is focused on bugfixes and performance improvements. In particular, 3.2.1 boasts some critical fixes for IE11 and node-webkit, as well as a fix for replication of conflicted documents.
{% include alert/start.html variant=“warning”%} This release contains a database migration, which means that once you upgrade you will no longer be able to use previous versions of PouchDB on the same databases. {% include alert/end.html %}
For performance, the biggest gains will be seen in secondary indexes and auto-compaction. Auto-compaction now occurs in the same transaction as bulkDocs, which speeds up the build time for secondary indexes (since they use auto-compaction under the hood). This also means that pouchdb-quick-search will be faster.
In addition, the LevelDB adapter now makes all its bulkDocs writes inside a single batch operation. This means that PouchDB can now provide the same consistency guarantees in both Node.js and the browser, since the LevelDB adapter is using the same transactional model as IndexedDB and WebSQL. Also, using a single batch boosts the write performance of LevelDB.
A performance comparison between 3.2.0 and 3.2.1 can be found in this report. The build times for secondary indexes have been reduced by 37%-57%, depending on the browser and environment.
A big shout-out this release goes to Will Holley, who has been tirelessly fixing bugs in the PouchDB test suite so that it can pass against CouchDB master. Not only does this improve PouchDB's test coverage against Cloudant, but it also better prepares us for the (soonish!) release of CouchDB 2.0. Thanks, Will!
And if you haven‘t checked out PouchDB Server or express-pouchdb recently, you’ll be pleased to see that Marten de Vries has made a ton of improvements over there, including cleaner configuration via config.json, authentication support, a --proxy option, CouchDB-style logging, “modes” to choose different CouchDB server features, and more. Just $ npm install -g pouchdb-server && pouchdb-server to try it out!
leveldown is now an optional dependency in Node.js due to build issues with Windows (#3113)changes() (#2867)skipSetup is true (#2915)auto_compaction is correctly reported in info() (#3345)allDocs() calls (#3153)Please file issues or tell us what you think. And as always, a big thanks to all of our new and existing contributors!