Why are .Net UIs slower than C++ or classic VB?

  • Thread starter Thread starter Jim Hubbard
  • Start date Start date
IF they ever did, it'd be interesting to see if they used .Net to write it.
I don't think they can. You can't write an OS in entirely managed code -
can you?

I'd love to see them put buffer overflow protection in the OS and keep the
OOP (class designs and the core classes) of .Net while tossing the framework
(i.e. IL code) idea. That should speed things up significantly.

Anyway, if they did a complete rewrite (slimming it down and speeding it up)
it would definitely be something worth paying to upgrade to.
 
Perhaps that explains it.

One of the apps I noticed it most in was PlanPlus. I was using a notebook
with a Celeron M processor and 1 GB RAM on XP Pro when I tested the trial
version.

With no other applications running (and no processes running rampant in the
background) whenever I clicked on a tab, you could almost watch the app
redraw every tab and button when it switched tabs. Very ugly
implementation. Looks unprofessional and slow.

Would I want to put my data into an app that looked ready to crash just
changing tabs? I think not.

Franklin Covey prominently displays Agilix as a partner in the development
of PlanPlus. Maybe they screwed this thing up. Maybe they used some very
unprofessional controls. Who knows......

I just want to make sure my apps look more professional than that.

I REALLY wish the WPF was available to use. In the demos it looks
professional, very fast and responsive. (Of course the PC it was running on
may have been a CRAY supercomputer.....but, it looked good.)
 
Well I doubt the kernel would be .NET ;-) .... but the .NET Framework should
completely replace the Win32 API. And, I mean COMPLETELY.... not just a
layer over it (that eventually calls down into Win32 for everything) the way
its implemented now.
 
I tend to agree with this post as well. Almost everything .NET does goes
through several layers, probably even a thunk or two (to convert say some
internal Long into a Win32 Int) until it finally reaches Win32... where of
course it goes through a couple of rings.

I wonder if there are ways for video card manufacturers to hook into .NET to
accelerate some things without waiting for the calls to reach Win32.... I
guess this is was Vista is suppossed to address.
 
Carlos,

Almost from the first start of OS or DOS or Computer Management System
whatever names this kind of things have had (The first computers had no OS),
they have existed from layers. The reason for this is simple, by instance
hardware changes should not have to influence the overall system, which was
direct a problem after the first use of OS that did not exist from layers.

Therefore for me it is a very good approach that Net is one of those layers,
they would be crazy to change that.

Problem is maybe that the last 20 years a lot of people are sticked to
Microsoft Systems or other microprocessor driven systems and think that
those are the only ones and use the names of those and are not able to think
in wider use of computers.

Therefore in my opinion the Net should *not* replace the Win32 API, there
should come API's which have a high flexibility to interact with Net; Net
can than always be placed above those API's.

This cost of course time to see the results; you cannot get rid of Win32 in
some years. I never have had any attention to how WinFX is build; however I
assume that this normal way by creating a next generation OS will be the
case.

Just my thought,

Cor
 
Patrice said:
So instead of starting a general discussion, IMO your best bet would
be rather to tell us what you have done that it slow so that one
could attempt to make suggestions to avoid this...

If not already done, you could start with UI code only and see how it
performs, post slow parts etc...

.NET GUI's are dead slow, period. I have a form with several tabs and
grids. When I resize it, it whobbles and is in all aspects very slow. I
profiled the crap out of it, and every profiler comes up with core .NET
slowness. I can't do a thing about it to make it faster. When I check
out VB6 forms, they perform a lot faster, I can't lie about that, it's
true.

That said, I also firmly think that winforms was a mistake. There are
simply too many issues with the winforms code. I hope WPF solves it,
though that's still far away and it will have its own list of
incompatibilities...

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
 
CMM said:
VB Classic made brilliant use of light-weight (not "real"... as in
not having hWnds) controls (The label, image, and shape controls)
that were painted by the VB Runtime and not handled by the OS. In
.NET everything has an underlying hWnd control underneath. These
creates some "robustness" but also introduces some bad performance...
hWnd controls really are "Windows".... they're created using the same
API (CreateWindowEx) as "Forms" and when an app has too many of them
it quickly degrades in performance.

No, that's not the cause. Every win32/MFC app uses hWnd's under the
hood and they're very fast. The main cause is that the asynchronous api
of win32 is used in a synchronous way and that gives a lot of problems.
Not only in delays, but also in events which occur in the wrong order
etc.

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
 
What do you want to do about those applications ?

You could try to decompile them if you wish but IMO it would be likely more
usefull to see this on your own real world example on which you have control
so it can be tested/changed. Else it will just raise IMO a general useless
discussion....

As .NET uses interop it is likely of outmost importance to minimize useless
calls (incidentally I'm coming accross an external application that refresh
4 times the same grid when it loads). Also you could try tricks such as
SuspendLayout/ResumeLayout or even hiding controls while you are intensively
updating them...
 
Frans Bouma said:
.NET GUI's are dead slow, period. I have a form with several tabs and
grids. When I resize it, it whobbles and is in all aspects very slow. I
profiled the crap out of it, and every profiler comes up with core .NET
slowness. I can't do a thing about it to make it faster. When I check
out VB6 forms, they perform a lot faster, I can't lie about that, it's
true.

That said, I also firmly think that winforms was a mistake. There are
simply too many issues with the winforms code. I hope WPF solves it,
though that's still far away and it will have its own list of
incompatibilities...

And, it is certainly no shame that a company (ANY company - even Microsoft)
makes mistakes. You always make mistakes. Success is what is left after
you toss out all of the mistakes. There's no shame in that.

The shame is when they cannot admit those mistakes (to themselves and their
customers), learn from them and move forward wiser and stronger than they
were before (with greater customer confidence and backing than before).

Even worse, they seem to simply try and hide one layer of mistakes with yet
another layer - instead of ripping out the weak parts and re-tooling the
layer. The silliest thing is that Microsoft seems to try and hide it's
obvious mistakes from programmers no less. How bizarre.....

Believe it or not, mistakes are how we grow. When we learned to walk, we
tried to balance and fell on our bums many times before we got it right.
But, nobody ever ignored the fact that we fell down, they simply applauded
when we got back up.

Although it may not seem like it, I am a fan of Microsoft. As a loyal fan,
I believe that I do Microsoft a dis-service by NOT calling them out on
things that are just plain wrong. I want them to admit their mistakes - to
foster trust between the company and its clients and customers. I want it to
learn from its mistakes - because I want better tools and a better desktop.
And, I want a company that listens to its customers and follows what THEY
want....not what IT wants.

While I am chomping at the bit to try WPF, right now .Net reminds me of "The
11 Pound Pencil". If you've never heard of "The 11 Pound Pencil" you should
read it at
http://www.mobilityguru.com/2006/03/05/who_designed_this_crap/ .



Jim
 
Back
Top