If the NotesStream is up to 51200 bytes then it is handled in memory, but if it is greater than 51200 bytes then it is written as a tmp file into the Domino temp folder.
To test this, run the following LotusScript on a Domino Server (Windows) and then check the Domino Temp folder for NotesStream temp files being created.
Sub Click(Source As Button)
Dim s As New NotesSession
Dim stream As NotesStream
Dim x As Long
Set stream = s.CreateStream
' 25600 - A stream up to 51200 bytes is handled in memory
' 25601 - A stream greater than 51200 bytes will be written as a file into the domino temp folder
' (One character needs 2 bytes)
For x = 1 To 2560100
Call stream.WriteText(|X|)
Next
Print stream.Position
Call stream.Close
End Sub
Use Case: For every web page load of thousands a day, which uses the NotesStream class and if it often exceeds 51 KB, then Domino writes it to disk. This is unnecessary and could be avoided if the threshold would be higher. Today's servers have more than enough memory capacity to handle that, but unnecessary writing to disks should be still avoided. This would help much for web servers performance.
Refer SPR # ARUIAW94RC
Please pick up this one!
We had already a Hotfix for that (901FP10HF144), but unfortunately is wasn´t rolled out in later releases.
Please also refer to SPR #ARUIAW94RC NotesStream uses a temp file if size is beyond 51200 bytes.
Mark Reiser
sirius-net GmbH