Speed of CMarkup
CMarkup parses megabytes quickly (typical times for 3MB are under a tenth of a second, see CMarkup Performance Tests), it also generates megabytes quickly, so if you run into any unexpected speed issues there might be something outside of CMarkup involved. Parsing documents is faster than generating documents. Note also that attributes are not indexed, so if the document utilizes attribute values more than element values, performance may be affected.
Prior to CMarkup release 7.0, the Evaluation version did not include the optimization for document creation. Its actually the speed of generating the medium to large document that is slow (i.e.
AddElem etc), not the
Save method. This was fixed in the developer version several years ago in release 6.0 but kept out of the Evaluation version because it could function without it. However, potential users may have been thinking this was a disadvantage of CMarkup, so it has been fixed in the Evaluation version now as well.
Large (even multi-megabyte) files are created very quickly. The solution is simply a matter of automatically allocating more ahead of time rather than re-allocating string memory every time the document grows a few bytes. 300k is actually pretty small and can be generated pretty much instantaneously. CMarkup is implemented by maintaining a single string member as the document, the Save method is a single write file I/O function.
If you are experiencing alarming degradation in performance when creating a document, it is very likely that you are using an old release of CMarkup. This behavior exactly matches the known issue with the Evaluation version of CMarkup prior to 7.0 described above. Although a user called it "Save" speed, it is actually "Creation" speed being referred to. You can check your version of CMarkup near the copyright remarks at the top of the source file. If you are using a recent CMarkup and/or you ever find that CMarkup is anything less than lightning fast at creating your documents, please don't hesitate to contact me.