473,320 Members | 2,112 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,320 software developers and data experts.

VB.net Memory usage 20k app, 15MB memory?

Is there anyway to reduce the amount of memory a VB.net program allocates?

Just a simple windows form, with one button and a label, and all the button
does is change the
text in the label (it's even hardcoded) and the EXE is using 15000+k of
memory according
to the task manager...
I mean I realize that VB is going to be more bloated than a C++ app. But is
there anyway
to reduce this amount? There should be no reason for it to think it needs to
'hold' 15 megs of memory
for a program that has absolutly no dynamic content.

-Grant
Nov 20 '05 #1
5 6695
Cor
Hi Grant,

There where a lot of questions about that, the answer is simple no. Untill
now we did not seen a solution that did make the programs smaller.

Only one solution there has been in this newsgroup to let it look smaller in
the taskmanager.
(The guy who did make it, did know that, however he did it because his
systemadmin did always complain. After that everybody was happy)

Cor
Is there anyway to reduce the amount of memory a VB.net program allocates?

Just a simple windows form, with one button and a label, and all the button does is change the
text in the label (it's even hardcoded) and the EXE is using 15000+k of
memory according
to the task manager...
I mean I realize that VB is going to be more bloated than a C++ app. But is there anyway
to reduce this amount? There should be no reason for it to think it needs to 'hold' 15 megs of memory
for a program that has absolutly no dynamic content.

-Grant

Nov 20 '05 #2
Grant,

I wouldn't judge memeory usage of a program by what task manager says.
Memory management in .net is a complex thing and includes lots of
optimizations for performace as well as optimizations for responding to
conditions when system memory may be low. Memory mamagement is also carried
out by the OS.

Try the following to prove this:

1) Run your program
2) Note it's memeory usage in the task manager
3) Minimize your form to the taskbar
4) Note the memory usage now

Unless you're doing a lot of COM interop or have a problem with major memory
leaks (where the usage keeps going up until your system becoms unstable), I
wouldn't worry about it.

HTH,

Trev.

"Grant Mills" <mi*************@telusNOSPAMplanet.net> wrote in message
news:vjYXb.11187$n17.4349@clgrps13...
Is there anyway to reduce the amount of memory a VB.net program allocates?

Just a simple windows form, with one button and a label, and all the button does is change the
text in the label (it's even hardcoded) and the EXE is using 15000+k of
memory according
to the task manager...
I mean I realize that VB is going to be more bloated than a C++ app. But is there anyway
to reduce this amount? There should be no reason for it to think it needs to 'hold' 15 megs of memory
for a program that has absolutly no dynamic content.

-Grant

Nov 20 '05 #3
* "Grant Mills" <mi*************@telusNOSPAMplanet.net> scripsit:
Is there anyway to reduce the amount of memory a VB.net program allocates?
Yes, by removing parts of it or optimizing the code.
Just a simple windows form, with one button and a label, and all the button
does is change the
text in the label (it's even hardcoded) and the EXE is using 15000+k of
memory according
to the task manager...


That's nothing to worry about. The CLR must be loaded and this will
need some memory.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
Hi Herfried,
I went to your homepage at mvps.org/dotnet but its in a language that I dont
understand (is it german?), is there any english version of it?
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:c0*************@ID-208219.news.uni-berlin.de...
* "Grant Mills" <mi*************@telusNOSPAMplanet.net> scripsit:
Is there anyway to reduce the amount of memory a VB.net program allocates?

Yes, by removing parts of it or optimizing the code.
Just a simple windows form, with one button and a label, and all the

button does is change the
text in the label (it's even hardcoded) and the EXE is using 15000+k of
memory according
to the task manager...


That's nothing to worry about. The CLR must be loaded and this will
need some memory.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #5
* "Abubakar" <em**********@yahoo.com> scripsit:
I went to your homepage at mvps.org/dotnet but its in a language that I dont
understand (is it german?), is there any english version of it?


I feel sorry, but the pages are currently only available in German.
You can use Google's language tools to translate the text to English.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #6

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

Similar topics

7
by: George Gre | last post by:
Hi, I wrote a c# programme that listens to incoming TCP requests and services them. This programme is meant to be running as long as the server its installed on is running. So we assume for...
7
by: Matthias Kwiedor | last post by:
Hi@all! I have a app (c#) where i load up a external dll (managed code from c#) with a small arraylist and hashtable in two routines (about 40000 objects in each arraylist and hashtable). If...
8
by: Fritz | last post by:
.... maybe now that it's a little clearer. Environment: Win Server 2003, :NET Framework 1.1, C# I have an application that polls on a web service method every time a timer event is raised. The...
8
by: lurker | last post by:
If a compiled exe project is under 400kb, why does it take up 15Mb when running? Is this normal? If not, how do I restrict the amount of memory it can consume? Secondly, does anyone have a bit...
8
by: nautonnier | last post by:
I know my problem has been discussed ad nauseum but I still don't get it so please bear with me. I have written a service which performs some work against a database once a day (usually in the...
0
by: cmartins | last post by:
Hi All! I have a perl script which uses these modules: ProcessAdapter.pl use File::Copy; use FileHandle; use Class::Struct;
7
by: Roman Petrichev | last post by:
Hi folks. I've just faced with very nasty memory consumption problem. I have a multythreaded app with 150 threads which use the only and the same function - through urllib2 it just gets the web...
19
by: jsanshef | last post by:
Hi, after a couple of days of script debugging, I kind of found that some assumptions I was doing about the memory complexity of my classes are not true. I decided to do a simple script to...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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)...
0
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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.