473,785 Members | 2,924 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Profiling .NET?

I'm especially hoping Ben Voigt and/or Bob Powell see this (I saw their
names on the m.p.d.f.perform ance newsgroup :) )

I would have posted to the performance newsgroup, but I see very little on
there that actually seems to relate to the _tools_ per se while this
newsgroup is actually somewhat related to the tools, and most of the
useful answers come from people known to frequent this newsgroup anyway,
so... :)

My basic question: I am trying to get better data as to why a particular
scenario of calling Graphics.DrawIm age() is so slow. Is there an
instrumented version of the .NET run-time that can be used for
instrumented profiling? Alternatively, does anyone have advice as to how
to get sampled profiling working on VS2008? (In theory, sampled profiling
would work with the regular .NET DLLs, since I can get symbols for those).

On the latter point, I thought it should "just work". But when I try to
do it, VS prompts me to see if I want to upgrade my permissions (I running
as non-admin, as I always do), I say yes and provide user/password for the
administrator account, at which point VS emits some non-descript errors
("can't profile") in the Output window, and then freezes. After that
(even if I terminate the VS process), I cannot use VS for any profiling
(even instrumented, which normally works fine) without restarting the
computer.

The more specific issue is this: a friend of mine uncovered a scenario in
which applying a certain Matrix to the Graphics.Transf orm property results
in abysmal performance. The weird part (as it that weren't enough) is
that the transformation being used is a scaling of exactly -1 in the
horizontal direction. If we change the scaling to be just slightly
greater than -1 (e.g. -0.9999), performance approximately doubles and if
we change it to be just slightly less than -1 (e.g. -1.0001), performance
is basically on par with the completely unscaled performance (approx 10x
better than the slowest case).

This makes no sense to either of us, and I was hoping to be able to use
the profiling tools to understand better what is costing so much
computationally in that particular scenario, and why that cost isn't
incurred in theoretically more difficult scenarios. But the only
profiling I've gotten to work so far only produces data for my own code,
and tells me that the vast majority of the time spend in the application
is in the Graphics.DrawIm age() method. But I already pretty much knew
that. :) I want to know _what_ in that method is taking so long.

Any advice on either aspect of this question?

Pete
Jun 27 '08 #1
9 1804
On Jun 5, 5:36 pm, "Peter Duniho" <NpOeStPe...@nn owslpianmk.com>
wrote:
I'm especially hoping Ben Voigt and/or Bob Powell see this (I saw their
names on the m.p.d.f.perform ance newsgroup :) )

I would have posted to the performance newsgroup, but I see very little on
there that actually seems to relate to the _tools_ per se while this
newsgroup is actually somewhat related to the tools, and most of the
useful answers come from people known to frequent this newsgroup anyway,
so... :)

My basic question: I am trying to get better data as to why a particular
scenario of calling Graphics.DrawIm age() is so slow. Is there an
instrumented version of the .NET run-time that can be used for
instrumented profiling? Alternatively, does anyone have advice as to how
to get sampled profiling working on VS2008? (In theory, sampled profiling
would work with the regular .NET DLLs, since I can get symbols for those).

On the latter point, I thought it should "just work". But when I try to
do it, VS prompts me to see if I want to upgrade my permissions (I running
as non-admin, as I always do), I say yes and provide user/password for the
administrator account, at which point VS emits some non-descript errors
("can't profile") in the Output window, and then freezes. After that
(even if I terminate the VS process), I cannot use VS for any profiling
(even instrumented, which normally works fine) without restarting the
computer.

The more specific issue is this: a friend of mine uncovered a scenario in
which applying a certain Matrix to the Graphics.Transf orm property results
in abysmal performance. The weird part (as it that weren't enough) is
that the transformation being used is a scaling of exactly -1 in the
horizontal direction. If we change the scaling to be just slightly
greater than -1 (e.g. -0.9999), performance approximately doubles and if
we change it to be just slightly less than -1 (e.g. -1.0001), performance
is basically on par with the completely unscaled performance (approx 10x
better than the slowest case).

This makes no sense to either of us, and I was hoping to be able to use
the profiling tools to understand better what is costing so much
computationally in that particular scenario, and why that cost isn't
incurred in theoretically more difficult scenarios. But the only
profiling I've gotten to work so far only produces data for my own code,
and tells me that the vast majority of the time spend in the application
is in the Graphics.DrawIm age() method. But I already pretty much knew
that. :) I want to know _what_ in that method is taking so long.

Any advice on either aspect of this question?

Pete
I have used red gates antz profiler. It gives your line and function
wise execution time.. Evaluation version..
Jun 27 '08 #2
On Thu, 05 Jun 2008 15:41:30 -0700, parez <ps*****@gmail. comwrote:
I have used red gates antz profiler. It gives your line and function
wise execution time.. Evaluation version..
I don't need _my_ line- and function-wise execution time. :) The VS
profiler does that too, and it works fine. I want the .NET information.

Does the Antz profiler provide profile information for execution within
..NET itself? If so, what prerequisites, if any, exist (other than having
the profiler itself, of course)?

Pete
Jun 27 '08 #3
Profiling in Visual Studio??? Where? When? Why?...... something tells me
that this is a Team edition thing and not available in the professional
version,is t?…. Damn it.
"Peter Duniho" <Np*********@nn owslpianmk.comw rote in message
news:op******** *******@petes-computer.local. ..
I'm especially hoping Ben Voigt and/or Bob Powell see this (I saw their
names on the m.p.d.f.perform ance newsgroup :) )

I would have posted to the performance newsgroup, but I see very little on
there that actually seems to relate to the _tools_ per se while this
newsgroup is actually somewhat related to the tools, and most of the
useful answers come from people known to frequent this newsgroup anyway,
so... :)

My basic question: I am trying to get better data as to why a particular
scenario of calling Graphics.DrawIm age() is so slow. Is there an
instrumented version of the .NET run-time that can be used for
instrumented profiling? Alternatively, does anyone have advice as to how
to get sampled profiling working on VS2008? (In theory, sampled profiling
would work with the regular .NET DLLs, since I can get symbols for those).

On the latter point, I thought it should "just work". But when I try to
do it, VS prompts me to see if I want to upgrade my permissions (I running
as non-admin, as I always do), I say yes and provide user/password for the
administrator account, at which point VS emits some non-descript errors
("can't profile") in the Output window, and then freezes. After that
(even if I terminate the VS process), I cannot use VS for any profiling
(even instrumented, which normally works fine) without restarting the
computer.

The more specific issue is this: a friend of mine uncovered a scenario in
which applying a certain Matrix to the Graphics.Transf orm property results
in abysmal performance. The weird part (as it that weren't enough) is
that the transformation being used is a scaling of exactly -1 in the
horizontal direction. If we change the scaling to be just slightly
greater than -1 (e.g. -0.9999), performance approximately doubles and if
we change it to be just slightly less than -1 (e.g. -1.0001), performance
is basically on par with the completely unscaled performance (approx 10x
better than the slowest case).

This makes no sense to either of us, and I was hoping to be able to use
the profiling tools to understand better what is costing so much
computationally in that particular scenario, and why that cost isn't
incurred in theoretically more difficult scenarios. But the only
profiling I've gotten to work so far only produces data for my own code,
and tells me that the vast majority of the time spend in the application
is in the Graphics.DrawIm age() method. But I already pretty much knew
that. :) I want to know _what_ in that method is taking so long.

Any advice on either aspect of this question?

Pete
Jun 27 '08 #4
On Thu, 05 Jun 2008 17:23:46 -0700, Rene <a@b.comwrote :
Profiling in Visual Studio??? Where? When? Why?...... something tells me
that this is a Team edition thing and not available in the professional
version,is t?…. Damn it.
Yes, sorry. Personally, I think _some_ kind of profiling ought to be in
the Pro version, even if it's dumbed down a bit.

But yes, you have to have the Team version to get profiling features. :(

Now if only I could get it to work.

Pete
Jun 27 '08 #5
On Jun 5, 7:14 pm, "Peter Duniho" <NpOeStPe...@nn owslpianmk.com>
wrote:
On Thu, 05 Jun 2008 15:41:30 -0700, parez <psaw...@gmail. comwrote:
I have used red gates antz profiler. It gives your line and function
wise execution time.. Evaluation version..

I don't need _my_ line- and function-wise execution time. :) The VS
profiler does that too, and it works fine. I want the .NET information.

Does the Antz profiler provide profile information for execution within
.NET itself? If so, what prerequisites, if any, exist (other than having
the profiler itself, of course)?

Pete
My evaluation version has expired. What i remember is that, i found it
more useful than the vs profiler.
Check out this link

http://www.red-gate.com/Products/ant...ugh1/step5.htm

see if that is what you want it to do.
Jun 27 '08 #6
I just had a quick look at mine and it if you switch the right option on
("All .NET methods") in a detailed performance profile it seems to give you
everything. Except source code of course :-)

Adam.

"Peter Duniho" <Np*********@nn owslpianmk.comw rote in message
news:op******** *******@petes-computer.local. ..
On Thu, 05 Jun 2008 15:41:30 -0700, parez <ps*****@gmail. comwrote:
>I have used red gates antz profiler. It gives your line and function
wise execution time.. Evaluation version..

I don't need _my_ line- and function-wise execution time. :) The VS
profiler does that too, and it works fine. I want the .NET information.

Does the Antz profiler provide profile information for execution within
.NET itself? If so, what prerequisites, if any, exist (other than having
the profiler itself, of course)?

Pete

Jun 27 '08 #7
First, how large is your image? If it is small enough to fit in the
memory on your graphics card then I suggest you bite the bullet and
upgrade to WPF. Your image transforms will run on the GPU if you do
that. It should give you much more consistent and speedy results.
Remember nobody has fixed any bugs with MS's GDI+ since 2003.
Actually, you may have better luck with Mono's GDI+ as it is still
actively developed.
Jun 27 '08 #8
On Fri, 06 Jun 2008 07:25:52 -0700, Adam Benson
<Ad*********@NO SPAMMYSPAM.omni bus.co.ukwrote:
I just had a quick look at mine and it if you switch the right option on
("All .NET methods") in a detailed performance profile it seems to give
you
everything. Except source code of course :-)
Okay...thanks, both of you.

If I get some time, I'll check out the evaluation version and see if it
seems more helpful.

Pete
Jun 27 '08 #9
On Fri, 06 Jun 2008 07:30:35 -0700, not_a_commie <no********@gma il.com>
wrote:
First, how large is your image? If it is small enough to fit in the
memory on your graphics card then I suggest you bite the bullet and
upgrade to WPF.
Good point. I'm sure it is small enough. I'm already intending to test
the scenario in unmanaged code, to see whether this is a .NET thing or a
GDI thing. Not sure if I'll bother trying GDI+ with unmanaged code, but
it might be worthwhile to explore a WPF test to see if it improves things.

Thanks for the suggestion.

Pete
Jun 27 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3720
by: James Sleeman | last post by:
Hi all, I'm trying to find a performance problem I've got in a reasonably large system I'm writing. Anyway, I've had a look around at the offerings for profiling php requests... xdebug : seems to make my requests just hit the 30 sec timeout all the time. apd : segfaults every time I make a request dbg : no front-end for linux (I looked a phpEd but it seemed to suck, and I couldn't see how to get profiling info out of it) ?
0
464
by: Irmen de Jong | last post by:
Okay I tried some profiling, but am uncertain about the results I'm getting. They confuse the hell out of me. I have a test program (see below) that essentially has two loops that get called repeatedly. One that is an idle wait loop, and one that is a busy-wait CPU hogger. I wanted to see what profiling results that would give. The total runtime of the program is 10 seconds, where 5 seconds are spent in the CPU-loop and 5 seconds in the...
3
10984
by: Richard Wallace | last post by:
Hello all, I'm looking for some input on the best tools to use for profiling multithreaded C++ code developed on GNU/Linux and compiled using gcc-3.1. More specifically, the distro in use is RH 7.2 running kernel 2.4.7 with SMP. The box has dual processors. Some of the options I've found are gprof - standard GNU profiler that comes with gcc. The biggest problem with this is that it does not support multithreading or
6
3753
by: cournape | last post by:
Hi there, I have some scientific application written in python. There is a good deal of list processing, but also some "simple" computation such as basic linear algebra involved. I would like to speed things up implementing some of the functions in C. So I need profiling. I first tried to use the default python profiler, but profiling my application multiplies the execution time by a factor between 10 and 100 ! So I decided to give a...
13
2284
by: Jens Theisen | last post by:
Hello, I want to apologise in advance for this being off topic. It's not neither A C nor a C++ question, but to profiling in general, though I my chances are best to find the answer in the C/C++ community. I have a C++ program to profile and went about it by producing large history files of calling dependencies with associated times. It is presumably similar to gprof's data format and could be converted.
0
2579
by: EdgarSanchez | last post by:
Hello Group, This mail is intended to announce the release of the newest version of SpeedTrace .NET Tracing & Profiling tool, SpeedTrace Pro. This tool is an improvement of the previous version that was launched in this group last year. SpeedTrace Pro has come up with the following new features: · Support .NET Framework 2.0 (Windows applications, ASP.NET, Windows .NET Services) · Improved Fast Engine(increased trace...
1
2031
by: =?UTF-8?B?TWFydGluIFDDtnBwaW5n?= | last post by:
Hello, I am searching for a good profiling tool for C# which can be easily embedded into Visual Studio. My objective is to measure the times and counts of every method in my program. If used the Coverage Tool of TestDriven.Net (http://www.testdriven.net/) which worked fine if I have defined any Unit test-cases.
0
2589
by: L'eau Prosper Research | last post by:
Press Release: L'eau Prosper Research (Website: http://www.leauprosper.com) releases new TradeStation 8 Add-on - L'eau Prosper Market Manipulation Profiling Tools Set. L'eau Prosper Market Manipulation Profiling Tools Set is a set of advanced tools that help Serious Traders analyze the market direction, market manipulative behavior and predicting the change of trend.
0
2351
by: L'eau Prosper Research | last post by:
NEW TradeStation 8 Add-on - L'eau Prosper Market Manipulation Profiling Tools Set By L'eau Prosper Research Press Release: L'eau Prosper Research (Website: http://www.leauprosper.com) releases new TradeStation 8 Add-on - L'eau Prosper Market Manipulation Profiling Tools Set. L'eau Prosper Market Manipulation Profiling Tools Set is a set of
0
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10315
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10085
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5379
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4045
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.