Published by Steve Litchfield at 15:50 UTC, September 2nd 2014
A little knowledge is a dangerous thing, it seems, and my attempt at simplifying the situation in terms of applications and Windows Phone 8.1 multitasking/optimisation was rightly picked at by a number of developers, who live and breathe this stuff. So I got in touch with one of them, Sarah Fegert, and asked some of the more pertinent FAQ-style questions….
[My questions to Sarah, obviously, are in bold]
I gather there’s no one single ‘type’ of Windows Phone application – how many ways are there to develop for the platform?
Quite a few! Most Windows Phone 7 and 8 apps were developed using a framework called “Silverlight”. What Microsoft has been doing over the last years is gradually converge the development tools and app types of Windows RT and Windows Phone into a single one. These new apps are called “Store” apps, and allow developers to write apps that run on both Windows and Windows Phone.
But to keep developers with existing apps happy, Microsoft also introduced “Silverlight 8.1”, essentially a turbocharged Silverlight, allowing existing Windows Phone apps to use most of the new features in Windows Phone 8.1.
What difference has it made for developers having Windows Phone 8.1 arrive? And, overall, is it an improvement (for developers)?
8.1 has been an incredible step forward. Windows Phone 8.0 was very restricted in what developers could do. Just one example: Most fitness trackers and smart gadgets use a technique called Bluetooth Smart to connect with your phone with minimal battery drain. Bluetooth Smart wasn’t available in Windows Phone 8, even though iOS and Android had it for years. So, Windows Phone 8.1 introduced a number of features that developers had demanded for a long time – features that often were available on competing platforms. Many of the new apps we’ve been seeing over the last weeks (FitBit, Hotel Tonight, Files, etc.) are a direct result of giving developers these tools.
My recent piece bemoaning imperfect application resumption got people talking. These being multi-GHz devices, what’s stopping every application from being quick to start and/or resume? What showstoppers are in the way?
The fundamental constraint is memory (RAM). To load an app and render the UI, the operating system needs to allocate some memory for the app, typically between 50-100 MB. When you leave an app (but don’t close it), the app stops doing anything, but remains in memory, and as long as it remains in memory, it resumes instantly when you switch back to it. What happens when you use too many apps is that the operating system would eventually run out of memory, and to prevent that from happening, it selects one or more of the suspended apps and shuts them down, freeing memory. This process is usually called tombstoning on Windows Phone. Now, obviously, tombstoned apps aren’t in memory anymore – so next time you switch back to them, the OS needs to reload the app and restore the previous state. When that happens, the user sees the dreaded “resuming…” screen. There is not really much that developers can do to prevent this from happening.
Subjectively, I see less resuming screens on my 1520 than on other devices – and seeing how fluid the user experience is on my 630, Microsoft has done an excellent job optimizing resource usage, in particular if you look at how badly Android runs on low-end devices.
Anecdotally, I’ve never ever had Twitter ‘resuming’ for more than one second, from a Lumia 520 all the way to a 1520. Usually it’s less than half a second. I wonder if there’s a bug somewhere…)
Do Microsoft’s own applications have any special privileges, or are they in the same boat as third party apps?
They certainly do – the operating system decides which app gets shut down when the phone is low on memory. Since users are very likely to use the Start Screen or the Email app, the operating system would typically try to shut down other apps first.
By the way, this is another area where the update to Windows Phone 8.1 really changed things. Apps used to have a fixed amount of RAM allocated – typically 150 MB – even if the app used only a fraction of that. Now, the memory allocated is much closer to what the app actually uses. In theory, this should improve multitasking. For example, on Windows Phone 8.0 when our users took a picture during their run on a low memory device, Track Runner would be tombstoned and the run interrupted. This is no longer an issue with the new memory allocation of WP 8.1.
What’s your view on transitions? Do you think Microsoft should offer a way to disable them, to speed up the WP UI?
Microsoft says that transitions don’t slow down the UI, and this matches my personal experience. Within the app, transitions are optional but they make up much of the Windows Phone feel, so apps without transitions feel rather alien to the platform.
Many thanks to Sarah Fegert, one of the co-founders of The App Cauldron, Inc, the development team behind the award-winning WP-exclusive running app Track Runner.