Tag: Performance

Device Development Rocks!

At a first glance, developing software for mobile and embedded devices does not seem to differ much from developing software for the desktop. If I limit myself to developing applications for Windows CE based devices, you can use the same development tools as desktop developers. However, there are a number of interesting differences. For starters, Windows CE is a much smaller operating system, meaning for instance that we only have a subset of the Win32 API’s available. The same is true for developers who like to write managed code; the .NET Compact Framework is a subset of the full .NET Framework. Another important difference is the amount of memory available on the device. Quite often you find yourself dealing with low memory situations. If you are allocating memory, you might not get the memory you asked for. Are you dealing properly with this situation? Also, devices typically have slower processors than desktop machines. Therefore it is very important to write efficient code or you will run into performance issues. And then there is the whole category of battery powered devices. Each statement that is executed inside your application will drain the battery a little. So again, writing efficient code is very important. Let’s even move up the bar a bit. Desktop machines are typically frequently restarted. Embedded devices often will stay on, always, 24 hours a day and 365 days a year. This means the code you write should not only be efficient, but it should be correct as well. Especially if you take a look at allocating and freeing up memory, you might get into trouble. If you are leaking memory, even only a couple of bytes / hour, you might end eating up all available memory. Another area where you need specific skills is for creating systems that need hard real-time functionality. Windows CE is a hard real-time operating system, meaning response times can be guaranteed. But you have to know a lot about how to synchronize threads, potential deadlocks, priority inversion and many other things. And of course, still keep efficient and correct programming in mind. If you are thrilled by all these things and you are still writing desktop applications, perhaps it is time for you to look into embedded development.

Focus on Performance

Sometimes, reality differs a little bit from ideas. I had planned to continue writing about comparing developing for Android and for Windows Phone. It will happen but just a little later. I also planned to blog a lot about Mango, especially since Windows Phone is now officially released in The Netherlands as well. Reality is that I have blogged, but on another blog and in another language. My company has introduced a new blog on which I have been writing over the last 2 months or so. It contains posts with technical information around Microsoft technologies that are relevant for my day-to-day work. Topics vary between Windows Embedded OS Design / application development, Windows 8 Metro Style application development and Windows Phone application development. If you are curious and if you understand the Dutch language, you can take a look at the Alten PTS TechCorner.

For the upcoming two months I again have some plans, but this time they will become reality. There are a few upcoming events where I will speak about using the profiler that is part of the Windows Phone 7.1 SDK tools. Understanding how to use the profiler and how to act on profiling results will help you improve performance of your Windows Phone applications. However, there is much more you can regarding application performance. Do you support Fast Application Switching in your own applications? Are you using Background Agents and against which price? Are you using IsolatedStorage as efficient as possible inside your own applications? What does that even mean: “using IsolatedStorage efficient”? What are the (performance) costs of persisting data in your application and how can you limit those costs? These are questions that I will answer in the upcoming months by showing sample code, showing lots of profiling results and writing / talking about performance. This is a topic I am passionate about. Hopefully you are as well. After all, performance is important for phone applications. End users will appreciate Windows Phone even better if all our applications will have great performance and batteries can be charged less frequent. Stay tuned, those performance posts will be published soon.