Fluidbyte/Codiad — pull request #98 by lorefnon (2012-12-17 14:16:14+00:00)
Title: Ajax payload optimization

Long pending pull request ... well, better late than never :)

Summary of changes:

- Instead of saving full file content on every save save only the changes since last save. This reduces data transfer significantly.
- Change calculation is done in background using HTML5 web-workers to keep the user interface responsive - patch calculation can take seconds for moderately sized documents. If web-workers are not available existing system continues to work. (Full file contents are saved).
- Modification time is tracked between requests. If a more recent copy is available at server, merging of patches is denied, and user is provided with the option of either fetching the server's copy or overriding it with current copy.

I will attempt to implement a better conflict resolution system. But that is probably better left for a future contribution.