Thursday 12 November 2009

NotesStream to the test

At the NL LUG 2009 Martin Scheafer improvised during his shortened session Domino Globetrotting/Dev talk. Due to customer regulations he could not show all he had planned to show.

And so he did a couple of side steps into @function and lotusscript coding. NotesStream was mentioned as a performance booster when building (long) strings e.g. in webagents when building return data for a webservice. During execution of demo code the difference between concatening a string using [string = string + extrastring] and the same code but now using NotesStream to build the return string, concatenating was a factor 4 to 5 slower than NotesStream.
I immediately saw an opportunity to improve the performance of the several agents we have running every day to transport product and other data from Notes to our Websphere Commerce servers via xml files. Some of them deliver a xml file of over 100mb.
So I put it to the test running 4 agents delivering the same result and each of them differing slightly in how the data is written.


  1. agent builds string (concatenate) to 65000+ bytes and than writes to file.
  2. agent builds string (concatenate) per record and writes to file per record.
  3. agent write to file directly, line by line.
  4. agent writes to file line by line using NotesStream.
The first 3 agents write to file via LS print, agent 4 using NotesStream.

The output build has the following structure per record:
<persoon>
<voornaam>Jan</voornaam>
<achternaam>Jansen</achternaam>
<woonplaats>Scherpenzeel</woonplaats>
<persoon>

The results in performance are listed below:
  1. Concatenated string test (concat string to 65000+ bytes before write).
    [Elapsed time: 296 seconds] [processed 123838 records]
  2. Concatenated string test (concat/write per record).
    [Elapsed time: 163 seconds] [processed 123838 records]
  3. Direct print to file test.
    [Elapsed time: 169 seconds] [processed 123838 records]
  4. NotesStream string test.
    [Elapsed time: 170 seconds] [processed 123838 records]
Conclusion is, NotesStream is indeed faster, but only when building large strings. The agent (1.) that concatenates strings up to 65000 bytes proves this. When keeping the strings limited in size, agents 2, 3 & 4, NotesStream performs equal to the other string methods.
And as Martin mentioned in his session, NotesStream is certainly helpful in webagents that build return xml's on request.

Monday 2 November 2009

NLLUG conference will see next edition in 2010

Last thursday and friday I spent my time at the Amsterdam RAI for the NLLUG conference. The first multiday conference in the history of the SNUG (Dutch Lotus software user group).
Over 300 visitors, 25 business partners, 37 speakers and 39 sessions in 3 parallel tracks (and on friday even a fourth track) have made it a succesfull conference.
As always the sessions were of great quality, enabling everyone to go away with new knowledge and ideas.
I loved Rob Novak's session in which he presented SNAPPS' MyDomino application whilst the audience was enjoying a beer, great format!! And awesome application!!
Ok it was Heineken, but you cannot blame him for that ;-), next time LaTrappe Blond Rob ?.

To continue the success, the dates for the NLLUG 2010 have already been set to the 17th/18th of june. So, mark these dates in your calendar.

During the NLLUG, 25 IBM Lotus business partners (together with IBM) have launched the "Lotus loves people" initiative to give the Lotus brand more attention (advertising ?) in the Dutch market.

SNUG team (Marnix Kemme & others), thank you very much for your hard work in putting together this great event.