profiler says connection.open is creating a LOT of strings
-
- Posts: 64
- Joined: Wed 04 Jan 2006 15:32
profiler says connection.open is creating a LOT of strings
Hi
I ran the profiler built into VS2005 on my project today and it raised an interesting point.
It says that Corelab.Oracle.OracleConnection.Open creates 49,992 string instances, 26,010 byte arrays and 48,400 type arrays.
Together they account for just over 50% of the memory allocated by my program.
Any ideas why this is so? I only open the connection once.
Thanks
Kevin
I ran the profiler built into VS2005 on my project today and it raised an interesting point.
It says that Corelab.Oracle.OracleConnection.Open creates 49,992 string instances, 26,010 byte arrays and 48,400 type arrays.
Together they account for just over 50% of the memory allocated by my program.
Any ideas why this is so? I only open the connection once.
Thanks
Kevin
-
- Posts: 64
- Joined: Wed 04 Jan 2006 15:32
there is a useful blog and video about it here:
http://channel9.msdn.com/ShowPost.aspx?PostID=46208
Basically go to Tools->Performance Tools->Performance Wizard
http://channel9.msdn.com/ShowPost.aspx?PostID=46208
Basically go to Tools->Performance Tools->Performance Wizard
-
- Posts: 64
- Joined: Wed 04 Jan 2006 15:32
-
- Posts: 64
- Joined: Wed 04 Jan 2006 15:32
just sent them.
I ran it with a different program too and it seems to think that one of my functions also creates nearly 20,000 strings, and that function is pretty straightforward, so I dont think it is anything to worry about.
It is very peculiar though! Perhaps it is something the framework is doing in the background?
I ran it with a different program too and it seems to think that one of my functions also creates nearly 20,000 strings, and that function is pretty straightforward, so I dont think it is anything to worry about.
It is very peculiar though! Perhaps it is something the framework is doing in the background?
-
- Posts: 64
- Joined: Wed 04 Jan 2006 15:32
OCI mode (the default one)
I havent noticed any performance difference between yours and the MS one, but then I havent done any benchmarking. I've never used the oracle one.
Memory usage of my app at startup is 43mb, which sounds perhaps a little high, but i find it very difficult to predict with .NET programs how much they should use.
As I said, I havent experienced any actual issues I was just curious as to what could be causing it.
Thanks for looking
Kevin
I havent noticed any performance difference between yours and the MS one, but then I havent done any benchmarking. I've never used the oracle one.
Memory usage of my app at startup is 43mb, which sounds perhaps a little high, but i find it very difficult to predict with .NET programs how much they should use.
As I said, I havent experienced any actual issues I was just curious as to what could be causing it.
Thanks for looking
Kevin
-
- Posts: 64
- Joined: Wed 04 Jan 2006 15:32
it seems that the behaviour is normal:
http://forums.microsoft.com/msdn/showpo ... 6&siteid=1
http://forums.microsoft.com/msdn/showpo ... 6&siteid=1