473,499 Members | 1,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I need speed Mr .Net....speed

Ham
Yeah,
Gotto work with my VB.Net graphic application for days, do any possible type
of code optimization, check for unhandled errors and finally come up with
sth that can't process 2D graphics and photos at an acceptable speed. I have
heard things about the virtual machine of Mr. Net, that it can run my app at
a high speed....but could never compare it with Java VM and its speed. Then,
what should i do? Go and learn C++ ? Do i have time for it? Can't Microsoft
enhance its .Net VM to run VB.NET applications at a C++ program speed?
.....And how long should we wait for reaching the Native speed?....
(and why the same managed C++ application run faster? We need more liberty
guys..)

(using VB.NET 2003 + Framework 1.1)

i stay here....

Nov 21 '05 #1
6 2014
Try using DirectX. No need to learn C++ and performs a variety of 2D and 3D
functions for you [already written in C++]

"Ham Come>" <mdz-+%@hotmail.> wrote in message
news:e3**************@TK2MSFTNGP15.phx.gbl...
Yeah,
Gotto work with my VB.Net graphic application for days, do any possible type of code optimization, check for unhandled errors and finally come up with
sth that can't process 2D graphics and photos at an acceptable speed. I have heard things about the virtual machine of Mr. Net, that it can run my app at a high speed....but could never compare it with Java VM and its speed. Then, what should i do? Go and learn C++ ? Do i have time for it? Can't Microsoft enhance its .Net VM to run VB.NET applications at a C++ program speed?
....And how long should we wait for reaching the Native speed?....
(and why the same managed C++ application run faster? We need more liberty
guys..)

(using VB.NET 2003 + Framework 1.1)

i stay here....

Nov 21 '05 #2
For pure performance, C++ will beat .NET languages in graphics (at least in
most cases). The major .NET benefits is the ability to get deep into the
WIndows API without API calls, the speed of development, etc.

This is not saying .NET is not fast. I have an file manipulation application
that achieves astounding speeds (rips through an 8GB file (76 columns fixed
width) in less than 20 minutes on 1.6 GHz P4 with 512MB RAM.

One issue with VB.NET is when you use the "Crutches" in the language. The
extra weight can kill your app if max perf is the issue.

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************

"Ham Come>" wrote:
Yeah,
Gotto work with my VB.Net graphic application for days, do any possible type
of code optimization, check for unhandled errors and finally come up with
sth that can't process 2D graphics and photos at an acceptable speed. I have
heard things about the virtual machine of Mr. Net, that it can run my app at
a high speed....but could never compare it with Java VM and its speed. Then,
what should i do? Go and learn C++ ? Do i have time for it? Can't Microsoft
enhance its .Net VM to run VB.NET applications at a C++ program speed?
.....And how long should we wait for reaching the Native speed?....
(and why the same managed C++ application run faster? We need more liberty
guys..)

(using VB.NET 2003 + Framework 1.1)

i stay here....

Nov 21 '05 #3

"Cowboy (Gregory A. Beamer) - MVP" <No************@comcast.netNoSpamM> wrote
One issue with VB.NET is when you use the "Crutches" in the language. The
extra weight can kill your app if max perf is the issue.


Specifically relating to graphics;

A.
Dim bmp as Bitmap = New Bitmap(3000,5000)

vs

Dim bmp as Bitmap = New Bitmap(3000,5000, Me.CreateGraphics)
B.
frmGraphics.DrawImage(bmpSource, Dest, Src, GraphicsUnit.Pixel)

vs

frmGraphics.DrawImageUnscaled(bmpSource, 0, 0)
The second option in both A and B can significantly increase
performance in performance critical code. That is to say, there
are performant routines in the .Net framework, the trick is knowing
where they are, and how to put them to use...

LFS
Nov 21 '05 #4
Let me clarify it:
I work currently on a bitmap editor and want to edit images pixel by pixel.
I mean using " GetPixel(i,j) and SetPixel(i,j,color) "....
The application has to go through the whole pixels and do the operation by
using" For-Next" loops. It works fine on upto 1000 * 800 bitmaps, but on
higher
resolutions, event with a separate thread for this Sub, the result is really
frustrating. My P4 2.4 GHZ computer hangs and this some times takes a minute
for a simple operation.....

And for the guy who said to use DirectX ....
First of all, direct X does not give all the facilities of GDI+....
Second, I have a lot of limitations concerning the size of my App and its
distribution...
That's why I never go towards DX for those GDI+ operations...

Thanks...

"Larry Serflaten" <se*******@usinternet.com> wrote in message
news:u4**************@TK2MSFTNGP11.phx.gbl...

"Cowboy (Gregory A. Beamer) - MVP" <No************@comcast.netNoSpamM>
wrote
One issue with VB.NET is when you use the "Crutches" in the language. The
extra weight can kill your app if max perf is the issue.


Specifically relating to graphics;

A.
Dim bmp as Bitmap = New Bitmap(3000,5000)

vs

Dim bmp as Bitmap = New Bitmap(3000,5000, Me.CreateGraphics)
B.
frmGraphics.DrawImage(bmpSource, Dest, Src, GraphicsUnit.Pixel)

vs

frmGraphics.DrawImageUnscaled(bmpSource, 0, 0)
The second option in both A and B can significantly increase
performance in performance critical code. That is to say, there
are performant routines in the .Net framework, the trick is knowing
where they are, and how to put them to use...

LFS


Nov 21 '05 #5
> I work currently on a bitmap editor and want to edit images pixel by pixel.
I mean using " GetPixel(i,j) and SetPixel(i,j,color) "....

this has to be slow, by design...
And the speed is limited by GDI+, not by VB.NET or the CLR.

Try:
http://msdn.microsoft.com/library/en...rp11152001.asp
instead of 'unsafe' C#,
maybe you could use IntPtr and the Marshal.* class for VB.

--
Thomas Scheidegger - MVP .NET - 'NETMaster'
http://www.cetus-links.org/oo_dotnet.html - http://dnetmaster.net/
Nov 21 '05 #6

Refer to http://msdn.microsoft.com/vcsharp/te...s/default.aspx
anf check out a #Randor library http://www.saintbox.net/

"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:uy**************@TK2MSFTNGP15.phx.gbl...
Try using DirectX. No need to learn C++ and performs a variety of 2D and
3D
functions for you [already written in C++]

Nov 21 '05 #7

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

Similar topics

10
2619
by: Beach Potato | last post by:
Dear Y'all: I'm about to start porting a big old project written in anscient version of Delphi to something more stable, robust, supportable and maybe even portable. Since I haven't seriously...
3
1229
by: Patric | last post by:
Hi I'm having some problem getting the following result. I have 2 tables Drivers -------- DriverID int (PK) DriverName varchar(50)
7
1532
by: borges2003xx | last post by:
hi everyone can someone suggest me where find a lot programming tricks for achieving the top speed in python? thanks everyone for patience
4
2600
by: Beeman | last post by:
I am looking for a good control that would display/print JPEG images in Access 97. The existing Image controls, even with the JPEG filters, are very slow - and I know there are better ones out...
5
2370
by: MFC | last post by:
Ok, after three C# books, (C# How to Program, Programming in the Key of C#, and C# Weekend Crash Course) and three weeks, I believe I have tried everything to make a certain form function...
1
2223
by: Brett Hofer | last post by:
Does anyone know of a good component for audio(.WAV) playback that supports double-speed/normal/half-speed? I need to provide this control in an .aspx page and control it using C#. I have tried...
3
2513
by: mistral | last post by:
Here is javscript clock: http://javascript.internet.com/time-date/mousetrailclock.html which I want adjust a little: 1. I want replace the days of week/year/date in external circle with just...
5
1674
by: ra7l | last post by:
Hi All .. First Thanks to All For Help Me .. ok ..This Code it Move Train but one errore small.. Where Correct Cods Thanks All .. :)
11
1572
by: lakshmiram.saikia | last post by:
Hi, I need to do the following operation : '" I have two mac addresses, say X and Y,where X is the base mac address, and Y is the nth mac address from X, each incremented by one. Now,I want...
0
7128
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,...
0
7169
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,...
1
6892
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...
0
7385
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5467
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4917
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...
0
3096
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...
0
3088
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
661
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.