Corey, I love this concept and have been thinking about writing something similar to augment SuperNTF, which currently relies exclusively on OpenLog-style logging. The problem with that is that each logged event translates into a separate document, and those pile up quickly. Error logging is great though.
So, the problem I quickly noticed with Flow was that the sample agents were incredibly slow running. I have ~1300 contacts but that shouldn't have been a big issue. What I discovered was that the log docs had created separate richtext body items for EACH contact. One might expect multiple body items in extreme cases where data exceeds the 64K limit, but this wasn't even close. Experiments revealed that agent run times increased exponentially with the number of records. For example, 100 records required the "Advanced" agent ~4 seconds, but 300 records took 22 seconds.
I did a little checking on how to keep the proliferation of body items in check, and found a comment on the ND6/7 forum from Andre Guirard that pointed to a simple solution. Just add a call to the NotesRichTextItem.Compact method before each document save. Doing so dropped the 300 record run time to just 12 seconds.
So in this example, the one line fix would go into the Flow Documents script library in the WriteToDoc function of the FlowRichTextDocument class, as shown here:
Private Function WriteToDoc(msg As String, logType As Integer, logLevel As Integer) As Boolean
If Me.m_doc Is Nothing Then Call Create<br/>
If logType < LOG_TYPE_EVENT Or logType > LOG_TYPE_ERROR Then logType = LOG_TYPE_EVENT 'Default to event type if we are passed an incorrect value<br/>
If logLevel < LOG_LEVEL_MINIMAL Or logLevel > LOG_LEVEL_DEBUG Then logLevel = LOG_LEVEL_MINIMAL 'Use default logging level if we are passed an incorrect value<br/>
<br/>
Call SetLogStyle(LOG_TYPE_TIME, 0)<br/>
Call Me.m_body.AppendStyle(Me.m_rtStyle)<br/>
Call Me.m_body.AppendText(GetTime & LOG_TIME_SPACER)<br/>
Call SetLogStyle(logType, logLevel)<br/>
Call Me.m_body.AppendStyle(Me.m_rtStyle)<br/>
Call Me.m_body.AppendText(msg)<br/>
Call Me.m_body.AddNewline(1)<br/>
Call Me.m_body.Compact '<<<<Kevin Pettitt added to boost performance and eliminate prolifieration of body items<br/>
Let Me.WriteToDoc = Save(True)<br/>
<br/>
Let Me.m_isLogEmpty = False<br/>
End Function<br/>
There does still seem to be some performance bleed as the run time increases are not proportional to number of records, but its pretty close: 1200 records took 57 seconds where you might expect 48 if things were linear.
Hope this helps.
Kevin