473,322 Members | 1,540 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Performance of handling WndProc

Hi,

Has anyone done any performance analysis of handling WndProc in C#? It
seems like there must be significant overhead in jumping between native
code and the CLR for every single Windows message.

Thanks,
Nader

Nov 17 '05 #1
4 2352
Nader,

There probably is, but every windows control does it, for the most part.

Are there specific issues you are seeing with a control, or is it a
general concern?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<ia******@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Hi,

Has anyone done any performance analysis of handling WndProc in C#? It
seems like there must be significant overhead in jumping between native
code and the CLR for every single Windows message.

Thanks,
Nader

Nov 17 '05 #2

<ia******@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Hi,

Has anyone done any performance analysis of handling WndProc in C#? It
seems like there must be significant overhead in jumping between native
code and the CLR for every single Windows message.

Thanks,
Nader


I'm not clear on what you mean by "jumping between native code and the CLR",
what makes you think that there is any jumping to the CLR and from the CLR
when a message arrives in the message queue?

Willy.
Nov 17 '05 #3
I misunderstood. I didn't realize all controls handle the message.
Makes sense as you have to override it.

Nov 17 '05 #4
When I first heard of "wndproc in C#" I also thought "oh something from
unmanaged world, wow" :-)

Ab.
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:et**************@TK2MSFTNGP14.phx.gbl...

<ia******@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Hi,

Has anyone done any performance analysis of handling WndProc in C#? It
seems like there must be significant overhead in jumping between native
code and the CLR for every single Windows message.

Thanks,
Nader

I'm not clear on what you mean by "jumping between native code and the

CLR", what makes you think that there is any jumping to the CLR and from the CLR
when a message arrives in the message queue?

Willy.

Nov 17 '05 #5

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

Similar topics

4
by: zzfreddybb | last post by:
We are using HP aCC compiler on a HP Itanium box ( 11.23) We are having some severe performance hits using exception handling ( try/catch ) scenarios. The online aCC documentation says: HP...
59
by: kk_oop | last post by:
Hi. I wanted to use exceptions to handle error conditions in my code. I think doing that is useful, as it helps to separate "go" paths from error paths. However, a coding guideline has been...
2
by: Jacek | last post by:
Hello Could someone tell me how to handle a message in my C# application sent from other application written in MFC C++, The message is sent using: ::SendMessage( hWndCallback, nMessage,...
2
by: Robert Wilson | last post by:
Hi everyone. I have a dialog box based application that I am developing for my employer. We are only just getting to grips with C~ having been developing in VC++ for ages. I am handling a...
4
by: vooose | last post by:
Is there any way to handle exceptions thrown by .NET classses? During runtime and at seemingly random times, exceptions similar to the ones shown at the base of this post are thrown. These errors...
4
by: Lance | last post by:
I need to handle the WM_SIZING message in the Form.WndProc method in order to perform custom logic while the user is resizing a form. But, I have two questions: 1. The help for WM_SIZING states,...
8
by: jcrouse | last post by:
I am using the following code to trap errors in a sub routine: Try Executable code Catch ex As Exception Dim strInputE As String = Application.StartupPath & "\Error.txt" Dim srE As...
0
by: Wallace Pipp | last post by:
I have an MDI application where I need to draw a line using Left/Right arrow keys. It works fine if it has just one child, but with more than one it switches between children. I've tried the...
6
by: JDeats | last post by:
I have a WinForms based application written for the .NET Framework 2.0 and in this application I need to be able to be able to take some action in code when the user finishes resizing the form. ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.