Will Subversion efficiently store OpenXML Office documents?

后端 未结 4 1129
忘掉有多难
忘掉有多难 2020-12-05 18:23

I have been managing Subversion as an engineering document storage repository for my company. It is working fairly well, however I have a question about how MS Office 2007

相关标签:
4条回答
  • 2020-12-05 18:57

    Subversion handles binary files quite well. It does not store a full copy for every commit but only an efficient binary diff.

    See the FAQ about this.

    0 讨论(0)
  • 2020-12-05 19:02

    Sadly, you can't currently do this with Subversion, but there has been some discussion around this:

    http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=651443

    0 讨论(0)
  • 2020-12-05 19:12

    From the OpenXML article on wikipedia:

    An Office Open XML file is a ZIP-compatible OPC package containing XML documents and other resources.

    In other words, OpenXML files are actually zip files with XML files in them. Compression or encryption "scrambles" the data, sabotaging subversion's ability to generate deltas between revisions. This is not related to the svn:mimetype. Subversion considers all files to be binary when generating deltas.

    In Dutch we have a saying "measuring is knowing". The graph below shows the results of an experiment where I imported a 500K OpenXML document in a SVN 1.6 repository (revision 1). I then added a paragraph from another document, saved and committed. This was repeated 5 times (revision 2 to 6).

    As you can see, committing a new docx revision that just adds a paragraph will cost you about 150K disk space. This is still much more efficient than just storing a copy of each revision without the help of a version control system.

    I also repeated the experiment with a separate test repository by uncompressing each revision of the docx. As you can see, the storage of the document revisions would be much more efficient if it wasn't compressed. It's also interesting to see that subversion's own data compression is about as efficient as zip. Storing the first revision of an uncompressed docx in subversion takes about the same space as the original docx.

    YMMV.

    0 讨论(0)
  • 2020-12-05 19:17

    Have you ever tried to open an OpenXML file in a text editor?

    To make it short: it is not text, it is still binary. So no, you can’t make Subversion handle it any different.

    0 讨论(0)
提交回复
热议问题