View Single Post
Old 04-01-2020, 10:00 AM   #8
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,860
Karma: 6120478
Join Date: Nov 2009
Device: many
Yes, I wondered the same thing.

Kovid has designed an interface for a "container" that creates hard links (two paths names to the exact same file) plus he can detect when changes are made and knows when to split that hard link into two separate links (a real copy on write/modification) approach. It is actually quite nice and similar to what we do in our plugin interface but at a greater scale. This allows him to make almost instantaneous file "copies" or "backups" and only incur the cost of a real file copy when absolutely needed.

We can not use that approach in Sigil in general as there are too many ways to change individual files and Sigil was not designed for that approach in mind. Plus Qt QHash did not support keeping attribute order unlike Python. So we had to create a simple Qt QHash variant to keep attribute order and then decided to use a git repository and actual checkins and things to store versions of the file and to produce diffs. They should be basically the same thing but his approach will be faster, whereas our approach can be used with external git tools/reports/etc. So each has its pluses and minuses but both should functionally do the same things. Allow reasonably fast versioned saves and restores if needed.
KevinH is online now   Reply With Quote