Thursday, January 13, 2011

Waiting for Moore's Law to Work

Reading the "Mobile Web Application Best Practices" a W3C Recommendation from 14 December 2010, I was struck by the similarity of the resource management challenges faced by early Personal Computer developers and those faced by mobile device developers today.

Here are some of the best practices for early PC Development that are arguably non-existent today.

Keep programs small (especially true for the Basic Interpreter, and then compiled programs that had to be shipped and installed on Floppy Diskettes. Smaller programs loaded and ran faster. Later with overlay managers it was important to optimize overlay segments for application start-up time.

Use memory very, very efficiently. First there wasn't much of it, and later when there was more, memory management and disk swapping caused performance issues, especially when multiple applications were running.

Keep your code footprint small. Early on this even meant keeping your variable names very terse (x,y,z were good candidates), there were even utilities that would convert your code before compile and reduce your nice long readable variables to terse variants.

Optimize the User Interface to be responsive or at least appear to be responsive to the user. This meant coming up with strategies to improve performance or at least hide slow running tasks, and when all else fails put up the hour glass and appear responsive.

Here are some of the best practices for mobile development from the W3C, "Mobile Web Application Best Practices".

Use Cookies Sparingly - information stored in cookies is sent to the server for every request and so using them for excessive amounts of data can negatively impact performance on a mobile network.

Use Transfer Compression - compression like HTTP 1.1 compression, which uses the gzip and DEFLATE algorithms which are widely supported, reduces bandwidth of each payload and increases transport efficiency. But...decompressing and compressing use up time and battery so this is a balancing act/ Alternative compression formats (such as EXI [EXI]) may be worth looking into.

Minimize Application Data and Size - obviously the smaller the better, faster downloads and execution time.

Minimize Perceived Latency - device limitations can lead to latency in page views, page reloads can frustrate even the most patient user.

As you can see we seem to be faced with similar resource management challenges as those faced by developers of the early PC. But why is this? Are we waiting for Moore's Law to raise all ships in Mobile Bay. Remember Moore’s Law?, named for Intel co-founder Gordon Moore, states that the number of transistors incorporated in a chip will approximately double every 24 months. That rate of progress means that the semiconductor industry will far surpass that of nearly all other industries over time, or from the flip side, other industries can't keep up. So the mobile device as a system, with components from several industries, batteries, network towers, displays, is going have resource management challenges and limits to growth directly related to the slowest advancing component.

We saw this with the PC, the integrated circuit was only one component of the overall system. And until recently we had some really, really fast computers with some really, really big monitors, that took up most of a normal size desk, now we have smaller, flatter monitors, we even have entire PC's the size of the old monitors.

The mobile device is more than the integrated circuit and it is experiencing the same disproportionate growth of it's individual components. Although if you look at the first "smartphones" you would have to agree that the iPhone in totality shows an amazing evolution in a short period of time. But you would also have to agree that certain components and sub systems are not as impressive in their rate of advancement and this can be seen in the familiar resource management issues mobile programmers are faced with today.

No comments: