Difference between %Stream.FileCharacter and %FileBinaryStream
Awhile back we had someone write some code to Log messages like we did in eGate but with Ensemble.
{
set vDIR="/ensemble/"_^OSUWMCInstance_"/logs/"
set fs=##class(%Stream.FileCharacter).%New()
set fs.Filename=vDIR_pComponent_".log"
do fs.MoveToEnd()
set vTM=$PIECE($ZDATETIME($HOROLOG)," ",2)
//$ZTIME($PIECE($H,",",2),1)
do fs.WriteLine(vTM_" : "_pMsgIn)
do fs.%Save()
set fs = "" // Close file
}
We found that the IO on this was slowing messages down, and those Operations that had high volume of message would fall behind. I have used %FileBinaryStream before on other items trying to write files. What is the difference between %Stream.FileCharacter and %FileBinaryStream? Is there a difference in throughput?
Thanks
Scott Roth
The Ohio State University Wexner Medical Center