|
-
Dec 4th, 2008, 07:41 AM
#1
[Resolved] Are compact framework applications usually this heavy?
Hello, my first venture into mobile development. I've been fiddling around with simple forms in a smart device application (Windows Mobile 6). One thing I've noticed is that no matter how simple the application, the memory consumption is... large. Let me explain.
I created a simple form with a button on it. No code written yet. I created a CAB for it (release build), sent it over to the device, installed, ran it. Then I checked the task manager and it showed 300K!
Other applications are usually about 30K or 50K, but my simple form was about 300K. I was wondering, perhaps this is related to the compact framework being loaded as well, but a search showed me nothing. It's like nobody talks about it, perhaps you guys could have a look. Do you observe the same thing?
Last edited by mendhak; Dec 6th, 2008 at 06:31 AM.
-
Dec 4th, 2008, 07:46 AM
#2
Re: Are compact framework applications usually this heavy?
Another question - do GPS/Serial Port applications also add to the memory footprint? Continuing on my form from above, I am now reading GPS data from COM1, constantly, and the memory footprint now hovers at about 590K. When I start logging it all to a textbox, it reaches 800K.
Is any of this normal?
In fact, I opened up a bunch of applications and here is what I got:
Opera Mini: 347K
Bubble Breaker: 7K
Windows Live Mail: 287K
IE: 1300K
Google Maps: 1020K
But these are large applications, which is why I thought that this may have to do with the framework...
-
Dec 4th, 2008, 09:57 AM
#3
Re: Are compact framework applications usually this heavy?
We don't talk about those things....
Actually, I haven't really gone looking at memory usage for PDA apps. I would not be a all surprised to find that it was the CF.
My usual boring signature: Nothing
 
-
Dec 6th, 2008, 06:31 AM
#4
Re: Are compact framework applications usually this heavy?
Sounds fair... I've managed to 'stabilize' my app at 500K but it won't go any lower than that.
-
Dec 7th, 2008, 07:28 PM
#5
Re: [Resolved] Are compact framework applications usually this heavy?
 Originally Posted by mendhak
...I created a CAB for it (release build)....?
Excuse me for venturing into the land of off-topic, but how the noodles did you create the CAB? I'm just starting out with the mobile development myself but cant seem to find how to create the CAB.
-
Dec 8th, 2008, 11:21 PM
#6
Re: [Resolved] Are compact framework applications usually this heavy?
I haven't written a portable in anything newer than 2003, but in that one there was an option on the build menu called Build CAB, with the icon of a yellow file cabinet. Newer versions of .NET may have moved the thing around, but you might find the same icon somewhere.
My usual boring signature: Nothing
 
-
Dec 9th, 2008, 12:07 PM
#7
Re: [Resolved] Are compact framework applications usually this heavy?
Ah yes, the wonderful compact framework. .Net applications on the desktop are very memory hungry as well but it's more evident in mobile solutions. The compact framework on mobile devices is a joke. CF 2.0 made memory much more efficient but it's still off the charts.
The only decent way to build an application for a mobile device, in my opinion, is with native code such as C++ for Windows Mobile. Sure it's a pain but... well, it's Microsoft's fault.
-
Dec 9th, 2008, 02:57 PM
#8
Re: [Resolved] Are compact framework applications usually this heavy?
Why is this memory thing such a problem? Are you multitasking on your PDA? Not very likely. The OS will swap whole programs out of memory as needed. None of my PDA apps have had any memory issues, despite being written for older hardware which had less memory.
My usual boring signature: Nothing
 
-
Dec 9th, 2008, 03:45 PM
#9
Re: [Resolved] Are compact framework applications usually this heavy?
 Originally Posted by Shaggy Hiker
Why is this memory thing such a problem? Are you multitasking on your PDA? Not very likely. The OS will swap whole programs out of memory as needed. None of my PDA apps have had any memory issues, despite being written for older hardware which had less memory.
PDAs continue to have memory issues. My last phone was an HTC 6800 and it only had 64MB of ram (about 54 actually usable and about 24 after the OS was loaded). With only 24MB of ram I really couldn't do anything and swapping is insanely slow. If I opened Internet Explorer then checked my e-mail it would start swapping like crazy.
Memory is still a big problem on PDAs. If you take a look at the Xda Developers (the folks who can usually take a new version of Windows Mobile and rip it to work on a PDA 5 years old) many create proofs of concept with C# then migrate to unmanaged C++ due to memory and speed deficiencies.
Also, many do multitask on their PDA / phone. I enjoy listening to music while sending an e-mail or a text message or even surfing the web. Multitasking is becoming very common on PDAs and phones.
Windows Mobile isn't the best OS for memory efficiency.
-
Dec 9th, 2008, 03:58 PM
#10
Re: [Resolved] Are compact framework applications usually this heavy?
Did you write any of the programs you mention? I don't have much control over other peoples software. All of my portable apps have a single form, and once they are up they are up. I suppose it could be an issue if I had a bunch of other heavy operations in the background, but I haven't encountered any issues with things like .NET TCP connections moving data in the background.
My usual boring signature: Nothing
 
-
Dec 9th, 2008, 04:26 PM
#11
Re: [Resolved] Are compact framework applications usually this heavy?
 Originally Posted by Shaggy Hiker
Did you write any of the programs you mention? I don't have much control over other peoples software. All of my portable apps have a single form, and once they are up they are up. I suppose it could be an issue if I had a bunch of other heavy operations in the background, but I haven't encountered any issues with things like .NET TCP connections moving data in the background.
The last application I wrote for Windows Mobile involved a SQL Lite database back-end that kept track of projects and a few other things. It was a beast in the memory usage so I ended up scrapping the project. Beyond that I've mostly been a user of managed and unmanaged applications.
Don't get me wrong my application could have been inefficient but even creating a simple form I think takes too much memory for a mobile device.
-
Dec 9th, 2008, 07:25 PM
#12
Re: [Resolved] Are compact framework applications usually this heavy?
Never create more than one form. Forms are too slow on mobiles, so you only want to incurr that cost once. I have a couple programs that make use of SQL Server CE databases, and do some fairly complex stuff. They have never been run with lots of other things going on at the same time, but I've never had any issue with them. Unfortunately, my current hardware is so meager that there really isn't anything I'd be able to run in the background to test multiple apps at any one time.
My usual boring signature: Nothing
 
-
Dec 10th, 2008, 03:58 AM
#13
Frenzied Member
Re: [Resolved] Are compact framework applications usually this heavy?
Applications using many forms, SqlMobile etc are no problem if written correctly - honestly.
We have many LOB applications out there written in .Net running on a daily basis, doing data collection etc without any problems. This has been the case from VS2003 and is still the case with VS2008. We had data collection s/ware that collected over 500,000 items, that was written using VS2003, bluetooth attached GPS and SqlCE2 which had no problems whatsoever.
I am not saying .Net CF is without problems, but to suggest it is unusable is just plain wrong.
Writing for CF takes more care and attention than writing for 'big' windows, but people are putting out systems on .Net CF on a daily basis without problems. You need to ensure you dispose of things when you have finished with them.
There are profiling tools out there for free - maybe worth looking at in the future.
-
Dec 11th, 2008, 04:49 PM
#14
Member
Re: [Resolved] Are compact framework applications usually this heavy?
 Originally Posted by Atheist
Excuse me for venturing into the land of off-topic, but how the noodles did you create the CAB?
IIRC you have to add a "CAB Project" to your solution.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|