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.
First of all I would like to let you know that CMarkup is a great tool and I have been using it for some time now. Unfortunately I have recently discovered a performance issue while creating an XML file! I am creating the XML file from a large grid (50 rows by 100 columns) with several elements for each cell. The performace (speed) of the XML creation is great for the first 1000 or so Elements but then the insertion of XML elements slows down very much and it takes a very long time to finish writing the XML file. The process decreases in performance drastically the more
xml.AddChilElem are added.
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.
Mark Rosen 14-Mar-2003
We're using your CMarkup 6.3 [Evaluation] XML library to both load and save XML in our applications. We're incredibly impressed with its load speed, but find its saving speed to be lacking. We're creating a 300k XML structure and calling .Save()...