Genii Weblog


Civility in critiquing the ideas of others is no vice. Rudeness in defending your own ideas is no virtue.


Thu 29 Sep 2005, 09:55 AM
The addition of DXL processing has been a great bonus for customers who need rich text manipulation, as there is now a native way to do many of the things which could previously only be done with the C API or with our Midas Rich Text LSX.  So, the question comes up sometimes, why bother with Midas for rich text manipulation? Sure, it does other things DXL can't touch, such as HTML generation, MIME e-mails, rich text comparison, contextual link matching and so on, but what about simple stuff like adding a table?  To address that, take a look at this question from the Notes 6 & 7 Gold forum: 
I am writing codes to generate a NotesDocument with a tailor-made table(diff cell color, merged cell) by DXL.

I found out using DXL to generating document with table is much slower than by using LS-RT table, especially when the table size is large.(9 sec vs 2 sec for 52row*16col table) However, DXL offers more flexible controls on complex table-making.

Is there any way to optimize the DXL codes?Excuse me, but 9 seconds?  To generate a single document with a table?

I responded with this, being as polite as I could be:
If you really want performance and control over rich text at the same time, DXL isn't going to work well for you, and neither will the native LS rich text classes.  Both are just way too slow.  If you need performance, you either need an API solution, which will be pretty complex to write, or a third party product such as our Midas Rich Text LSX, which combines high levels of flexibility with extremely high performance.

As an example, I tried creating a table such as you describe, with different cell colors and merged cells and 52 roiws and 16 columns.  I tried once creating the whole table at one call (without the merged cells), and another where every row was created separately to allow merging and changing various cell attributes.  In both cases, creating a single table was too fast to measure, so I created 100 separate documents with a table such as this in each. 

Midas Rich Text LSX times

Table created in one call
Table created a row at a time
100 documents
4 seconds
15 seconds

As you can see, well under a second is better than either the 9 seconds DXL takes or the 2 seconds the LS RT classes take.  Of course, you may not need that level of performance, but if you are creating 25,000 documents and doing other processing (as a recent customer described), you might want it to complete in less than the 62.5 hours that the DXL processing would require, or even the almost 14 hours the rich text classes would take, even if they could handle this.  The customer's job is slightly different, but does involve appending large tables a row at a time, and they report that the task runs in a bit less than 1 hour, even with all the additional processing.

So, while DXL is great, don't start using it unless you have lots of patience and like going on coffee breaks.  Nine seconds!?!?

Copyright © 2005 Genii Software Ltd.