RE: redirect trace to textbox performance

2012-02-23 Thread ifumust
You are correct i probably am running out of memory..will create a FILO
buffer for the test

-Original Message-
From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com]
On Behalf Of David Kean
Sent: Thursday, 23 February 2012 6:44 PM
To: ozDotNet
Subject: RE: redirect trace to textbox performance

At a wild guess, are you throwing away the trace at all? Or do you just keep
adding to the text box? You're probably running out of memory.

-Original Message-
From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com]
On Behalf Of Mark Hurd
Sent: Wednesday, February 22, 2012 11:24 PM
To: ozDotNet
Subject: Re: redirect trace to textbox performance

On 23 February 2012 17:17,   wrote:
> I have been redirecting the trace.writeline output to a textbox in 
> most of my applications.  Its works great and helps me resolve issues 
> very quickly but i find it can decrease the performance of the application
dramatically.
>
> Anyone suggest the better way do this?  I am aware of log4net etc but 
> interested in other people suggestions/opinions.
>
> I use a sub like this to make it thread safe
>
> Private Sub objTraceListener_TextChanged(ByVal sText As String) 
> Handles objTraceListener.TextChanged

I haven't actually looked it up to confirm, but I guess the TextChanged
event is actually (sender As Object, sText As String) and the infrastructure
used to allow alternative event signatures seems a bit "interesting".
Whether it is actually a performance issue though, I don't know -- profile
it.


>
> Anthony
>
>

--
Regards,
Mark Hurd, B.Sc.(Ma.)(Hons.)




RE: redirect trace to textbox performance

2012-02-22 Thread David Kean
At a wild guess, are you throwing away the trace at all? Or do you just keep 
adding to the text box? You're probably running out of memory.

-Original Message-
From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On 
Behalf Of Mark Hurd
Sent: Wednesday, February 22, 2012 11:24 PM
To: ozDotNet
Subject: Re: redirect trace to textbox performance

On 23 February 2012 17:17,   wrote:
> I have been redirecting the trace.writeline output to a textbox in 
> most of my applications.  Its works great and helps me resolve issues 
> very quickly but i find it can decrease the performance of the application 
> dramatically.
>
> Anyone suggest the better way do this?  I am aware of log4net etc but 
> interested in other people suggestions/opinions.
>
> I use a sub like this to make it thread safe
>
> Private Sub objTraceListener_TextChanged(ByVal sText As String) 
> Handles objTraceListener.TextChanged

I haven't actually looked it up to confirm, but I guess the TextChanged event 
is actually (sender As Object, sText As String) and the infrastructure used to 
allow alternative event signatures seems a bit "interesting". Whether it is 
actually a performance issue though, I don't know -- profile it.


>
> Anthony
>
>

--
Regards,
Mark Hurd, B.Sc.(Ma.)(Hons.)




Re: redirect trace to textbox performance

2012-02-22 Thread Mark Hurd
On 23 February 2012 17:17,   wrote:
> I have been redirecting the trace.writeline output to a textbox in most of
> my applications.  Its works great and helps me resolve issues very quickly
> but i find it can decrease the performance of the application dramatically.
>
> Anyone suggest the better way do this?  I am aware of log4net etc but
> interested in other people suggestions/opinions.
>
> I use a sub like this to make it thread safe
>
> Private Sub objTraceListener_TextChanged(ByVal sText As String) Handles objTraceListener.TextChanged

I haven't actually looked it up to confirm, but I guess the
TextChanged event is actually (sender As Object, sText As String) and
the infrastructure used to allow alternative event signatures seems a
bit "interesting". Whether it is actually a performance issue though,
I don't know -- profile it.


>
> Anthony
>
>

-- 
Regards,
Mark Hurd, B.Sc.(Ma.)(Hons.)