Remon wrote:
Hey,
   we are doing a very performance-critical system.
I need to profile the speed & size of each object , method calls & so.

I have got some profilers , but non measures the object's size.

Do you have any method , library , etc.. to measure the size of instances of the classes ?
Also anyone recommends a good performance measurement / profiler for .net ?

Thanks in advance


is it Speed critical or Size critical ?

at what level ?

will it run on a device like an embeded system or a normal PC / server ?


in most cases I'd say write the app or a sample of the app and just see if it has a perf problem then look at what to tune.

due to GC and memory management trying to pin-down the size will be difficult at best and may not make it run any better.

things that tend to be the hogs and killers are the things that cause 2nd level GC events. or too many first level GC's

for example strings..... if you create and modify a lot of them you can consume a *LOT* of memory and have a lot of GC runs to slow you down.
sometimes you use StringBuilder() to fix that.
but any time you have boxing / unboxing going on you will incurr perf issues.
so look for that also.