[Mono-list] newbie - understanding profiler data
pjsmith
pjsmith at mtgsy.net
Wed Aug 31 19:57:08 EDT 2011
Hi,
That's part of the problem I'm trying to resolve though. I'm not creating
thousands of streamwriters. I have 1 very simple function that writes log
lines to a file once per second and is called by timer. Code below.
Public Sub LogWrite()
Dim t As String
Dim e As String = "NOERROR"
Try
If LogLines.Count > 0 Then
Dim sw As System.IO.StreamWriter
SyncLock lck_logfile
SyncLock lck_loglines
Try
sw = New System.IO.StreamWriter(LogStore, True)
For Each ll In LogLines
sw.WriteLine(ll)
Next
Catch ex As Exception
Console.WriteLine("error logging query: " &
Err.Description)
Finally
If Not IsNothing(sw) Then sw.Close()
LogLines.Clear()
End Try
End SyncLock
End SyncLock
sw.Dispose()
sw = Nothing
End If
Catch ex As Exception
Console.WriteLine("error in logwrite : " & Err.Description)
End Try
End Sub
There isn't another single reference to streamwriter anywhere in my code.
Doens't seem to happen when I run it on windows under .net, but on linux
under mono, I see high memory usage. I can't see why the above should use
110Mb?
--
View this message in context: http://mono.1490590.n4.nabble.com/newbie-understanding-profiler-data-tp3781405p3782494.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list
mailing list