Taking the Time to Get it Right
In October we wrote about our plans to add support for Subversion 1.7 to Cornerstone 2.7. It was our hope that this would be ready by the end of 2011.
Unfortunately this won’t be the case.
We knew that supporting 1.7 would take more work than previous versions. We described it as “disruptive” but we didn’t anticipate just how disruptive it would be.
The Problem: Incompatible APIs, Performance Regression and SQLite
Subversion 1.7 includes a complete re-write of the code that manages working copies. While the Subversion developers have attempted to hide the differences between the old and new implementations they were unfortunately unable to do so with 100% compatibility.
For example, 1.7’s re-implementation of the working copy status API used by Cornerstone is now 10x slower than the same API in Subversion 1.6. It provides the same output, but what previously completed in 200 ms now take over 2 seconds. We don’t think this kind of performance degredation is acceptable and spent some time migrating Cornerstone to use newer and faster APIs.
But the most disruptive change results from Subversion’s use of SQLite.
Cornerstone makes heavy use of threading – almost all interactions with Subversion take place on background threads to prevent the user interface from blocking – and SQLite places strict constraints on how it’s data structures can (or, more accurately can’t) be shared between threads. As a result, certain data structures that could be shared between threads prior to 1.7 (and had worked absolutely fine in 1.3, 1.4, 1.5 and 1.6) now raise errors as soon as they’re accessed from different threads.
The Solution: Building a Platform for Future Development
We came to the conclusion that we would have to re-think certain core aspects of how Cornerstone interacts with Subversion. The constraints introduced by SQLite make it substantially more complicated to use Subversion’s APIs from multiple threads. We ended up having to re-design the way in which key data structures are allocated and managed by Cornerstone.
This has taken a lot of work. We’ve been working on this at full-tilt for the last four months, dedicating all available resources to re-building key areas of the application to serve as a solid foundation for future development.
We’ve also totally re-written Cornerstone’s security stack to enable this new design, and have done so in a way that enables key improvements such as support for certificate-based authentication and temporary (i.e. non-persistent) credentials.
Finally, we’ve also re-thought how Cornerstone should store its credentials and have replaced key areas of the Subversion authentication stack with alternatives that use the Mac OS X keychain.
These are big and worthwhile improvements. And rather than take shortcuts or rush these changes, we’ll be taking the time to get them right.
We now plan to release Cornerstone 2.7 before the end of February 2012.
Thanks for your patience.