Hacker News new | ask | show | jobs
by pcwalton 4499 days ago
> Applications written in C, C++, Objective-C and even Java vastly outperform HTML5/JavaScript-based apps, especially on devices with limited capabilities.

Citation when it comes to Java (assuming you're talking about Dalvik, because that's the relevant Java implementation on mobile)? Dalvik is not generally considered as fast as either V8 or SpiderMonkey. For example: https://blog.mozilla.org/javascript/2013/08/01/staring-at-th...

2 comments

The issue is not wether spidermonkey or v8 is faster than dalvik, the issue is wether the UI feels responsive or not.

On a low hand device,you cant honestly say, an HTML5 ui on firefox os will be faster and more reponsive than an android ui coded with the android framework. Wether X javascript engine is fast or not is irrelevant. Users are not stupid, they can tell a fast and responsive ui from a clunky HTML/JS one.

Finally Javascript gives you 0 tool for manual memory management,which is central for any embedded programming. On Android and Iphone one can go down to C/C++ if necessary.

The idea of a 25$ device that would run javascript programs/uis efficiently is preposterous.

> Finally Javascript gives you 0 tool for manual memory management,which is central for any embedded programming. On Android and Iphone one can go down to C/C++ if necessary.

asm.js offers manual memory management, with no garbage collection. You can compile C and C++ and it will run essentially natively, modulo the sandboxed safety checks.

Unrealistic micro-benchmarks aside, I've yet to find an Android app written using HTML5 and JavaScript that feels anywhere near as smooth and efficient as native apps written in Java. I suppose I don't have numbers to back me up, but I'm not sure that really even matters. The performance difference is something that users notice.
I suggest you watch the video here: http://blogs.telerik.com/kendoui/posts/13-10-31/html5-the-pl...

You might also want to check out what Sencha did with Fastbook: https://www.youtube.com/watch?v=wCn3R3-XxBU

Those companies have an agenda to sell regarding HTML5 development, plus as soon as your target middle to low end handsets it is turtle speed time.
Those companies have an agenda to sell regarding HTML5 development

They do. However, don't be so quick to dismiss the point they are making: on high-end devices at least, html5 apps are at least as good/performant as native apps.

By the way, Apple, Google and Microsoft each have an agenda as well: to enclose developers in their walled garden, making them learn and use proprietary non-cross-platform APIs so that apps can't achieve a "ship new features everywhere, at the same time, easily" approach. They also want you as a user and a developer to abandon your phone after a while by deprecating APIs and making the OS effectively non-updatable, and making it very hard to update manually (do you know how to port Cyanogenmod to your device? Fix its bugs?).

as soon as your target middle to low end handsets it is turtle speed time.

... on Android. It probably isn't great on low-end or old hardware (although light pages should still run fine). However, Firefox OS is designed and optimized for running those webapps on low-end hardware, contrary to Android.

Which vendor do you trust to make the web fast? The ones who have nothing to gain from it, because they wouldn't be able to retain users anymore who could switch to a new OS in a heartbeat if all the apps were webapps? Or the vendor who made huge contributions to the open web?

For me the web are the network protocols and the browser should stay as document platform.

Too much pain with web development projects since the .com days.