Don't get me wrong – B4PPC is a great tool to build apps for mobile device – it's simple, easy to use, fully documented, with numerous options and addons.
BUT
Running a very simple app like "Hello World" that weight only 40 KB (see code bellow) takes 6-8 seconds and about 3 MB of memory on the device.
A more complicate app will take about 10 seconds to load and 4-6 MB of memory.
I mean B4PPC is a very powerful tool but is there any way to reduce both memory and loading time?
"Hello World" Code:
Sub App_Start
Form1.Show
AddTextBox ("Form1","TextBox1", 60, 120, 100, 25, "")
TextBox1.text="Hello World"
End Sub
Which version are you using and on what device?
Optimized compiled applications should load pretty quickly.
For some reason you appear as an unlicensed user.
Please send me a private message with the email address you have used when buying Basic4ppc so I will fix this issue.
When you first run your application, the .Net CF is loaded.
Next launches should be faster.
.Net applications handle memory allocations using "garbage collection".
The garbage collector doesn't "hurry" to release allocated memory.
Generally speaking, when more memory is required by your application or other applications it will free unused memory.
It is very rare to get an "out of memory" exception.
When you first run your application, the .Net CF is loaded.
Next launches should be faster.
.Net applications handle memory allocations using "garbage collection".
The garbage collector doesn't "hurry" to release allocated memory.
Generally speaking, when more memory is required by your application or other applications it will free unused memory.
It is very rare to get an "out of memory" exception.
Yes, your are right. After starting it the second, it loaded much faster. Memory manager showed even 4 mb more space after closing the notetrainer, but this reflects not the real usage of the program if I understood you right.
I'm not an expert but logically it just doesn't make sense, one form with one control (like "Hello World") weights 3 MB of memory. There must be a way to dispose most of the .netCF components.
I'm speaking theoretically – I don't really know what's going in there, but logically – don't you think that something here is wrong?
No! That's the way .NET works. Why do you think it matters, have you run out of memory? How the Compact Framework manages memory is invisible to you and is meant to be invisible. One of the main advantages of .NET is that memory is managed for you - no reference counting, no remembering to free malloced blocks of memory, no memory leaks.
Relax, buy Basic4ppc, get on with coding and let the Framework look after itself.
That was much faster. It didn't take less then 1 second (close to 3 seconds) but it only required 0.6 MB of memory.
I guess my version is obsolete. (both WM5 & B4PPC)