Add support for incremental edits, like the web application. This should improve the performance on huge documents.