daleharvey/pouchdb — pull request #335 by jlaxson (2013-01-11 22:25:20+00:00)
Title: Iterative tree algorithms

This commit takes all of the recursive algorithms in Pouch.merge and Pouch.js that implement tree merging and traversal, and implements them in an iterative form. This seems to do a lot to help with stack errors on mobile devices.

I can't get the saucelabs tester to work, but I've tested on Safari, Chrome, FF, and iOS 6 Mobile Safari.