Performance of context-aware algorithms implemented in web technologies

Gabor Paller's picture
Gabor Paller
contextawarewebperf.pdf128.18 KB

Adopting the web model may significantly simplify the UI part of the application, particularly if the developers have web experience and if platform-independence is a concern (e.g. the same application has to be published on Android and iOS too). JavaScript is a powerful scripting language and implementing even complex application logic is possible.

Care must be taken, however, if parts of the application is exposed to even moderately frequent recurring events. The paper demonstrates that in such cases (e.g. sensor sampling) an application implemented in the web model generates significantly higher CPU load and consequently much higher battery drain.
The web model excels in the use cases it was designed for: presenting a UI to the user and handling events from the user. JavaScript is still an interpreted language, however. If JavaScript code is exposed to frequent events, it can consume significant CPU power. Not every context-aware application falls into this category but if the use case demands sensor sampling, a native option must be available and has to be used alongside the web model.

Linked document