Live data from Hacker News

Making Facebook's native mobile app faster using HTML5

sencha.com

11–20 of 166 posts

Re: Making Facebook's native mobile app faster using HTML5

#11
I ran the HTML5 app on my iTouch 4G running iOS 6 (roughly equivalent to iPhone 3GS) and compared it to the native FB app. The HTML5 app had noticeable lag in the swipe transitions. It also crashed once when loading a photo (only once though). Not to mention that they implement almost everything differently and leave out 90% of FB's features.

That being said, it was really smooth on my iTouch 5G.

The demo HTML5 app also runs in Safari. The problem is that Safari's Nitro JS engine is much faster than the older JS engine used in a UIWebView (I think the restriction is supposedly due to security).

For the moment, native is still the way to go, IMO. But I've always believed that at a certain point iPhones/Androids and their browsers will be powerful and efficient enough to negate any performance drawbacks to HTML 5. I think that point might arrive by the iPhone 6 or so, when developers might feel comfortable dropping support for the iPhone 3GS and equivalent. In fact, many devs are already dropping support for the iPhone 3GS.

Re: Making Facebook's native mobile app faster using HTML5

#12
post #10

Why do we see plenty of articles saying that HTML5 can be as good or better than native code and no actual applications doing it? Facebook and Google tried and miserably failed, LinkedIn and Twitter are probably the ones closest to actually doing it, but users still prefer the native version, why? One I think is a big reason is clearly visible in the video: scrolling physics are different. It's annoying and feels wro…

I think it's a mix of FUD and reality. It's true that for most older devices HTML5 apps just don't perform very well, but they are slowly disappearing from the market.

Google hasn't "miserably" failed, they use the same basic strategy that LinkedIn does; namely, a they make hybrid mobile apps where they mix both native and HTML5 components to get the best performance and flexibility. It's worked quite well for them.

Re: Making Facebook's native mobile app faster using HTML5

#13

A lot of the points that they make in the video are just flaws with Facebook's implementation of the app, rather than being a point for HTML5 or a point against native. Truth is - HTML5 apps can be made to perform well but there are limits. Battery life suffers and you may find in future that the cool animation/whatever you wanted to add in is too laggy (especially on older devices).

Older devices will slowly dissipate from the market because of the ubiquitous two-year contracts, though, and eventually everyone's phones will be capable of delivering native-like performance on HTML5 apps. It's only a matter of time.

The moment older devices slowly fade out from the market, and new high end devices started to fade in, native app speed now doubled.

Re: Making Facebook's native mobile app faster using HTML5

#14

I ran the HTML5 app on my iTouch 4G running iOS 6 (roughly equivalent to iPhone 3GS) and compared it to the native FB app. The HTML5 app had noticeable lag in the swipe transitions. It also crashed once when loading a photo (only once though). Not to mention that they implement almost everything differently and leave out 90% of FB's features. That being said, it was really smooth on my iTouch 5G. The demo HTML5 app a…

I am currently developing a vanilla (no mobile frameworks like sencha) mobile web app I can attest that on IOS you can pretty much get native performance if you do some trade off and optimize your app rendering.

On android that's another game and you can forget about all those cozy animations and only devices with android 4.0+ will perform well, or at all (in my case anyway).

Also I'm really not sure why people currently associate html5 apps with bad battery life, personally I did not see any noticeable differences in usage from a native one, hell native use a lot more the gpu so it should be worse.

Re: Making Facebook's native mobile app faster using HTML5

#15
Nitro Javascript engine? It could be an important difference between this test and FB's app. Safari gets it. It seems ambiguous still whether UIWebView users get it.

A more apples-to-apples comparison would be to put it in a iOS app running UIWebView and see if the performance is maintained. I'd certainly be interested in the results.

Re: Making Facebook's native mobile app faster using HTML5

#16
I suspect they misunderstood the "HTML5 is not ready" statement. Indeed, HTML5 can perform, and the future is bright. However, as plenty of people in the comments here have mentioned, for mainstream devices.. it's not ready. The frameworks are still coming up a learning curve, the hardware devices out there are still struggling to adopt proper HTML5 support and decent performance. Those points alone lend credit to the fact that it's just not ready.

Re: Making Facebook's native mobile app faster using HTML5

#17

Earlier quoted context omitted.

Older devices will slowly dissipate from the market because of the ubiquitous two-year contracts, though, and eventually everyone's phones will be capable of delivering native-like performance on HTML5 apps. It's only a matter of time.

The moment older devices slowly fade out from the market, and new high end devices started to fade in, native app speed now doubled.

Doubled from awesome to... awesome? Native performance is the goal. I don't see how much better a data heavy native app like FB can get, but I do see how HTML5 apps can get better.

Re: Making Facebook's native mobile app faster using HTML5

#18
post #16

I suspect they misunderstood the "HTML5 is not ready" statement. Indeed, HTML5 can perform, and the future is bright. However, as plenty of people in the comments here have mentioned, for mainstream devices.. it's not ready. The frameworks are still coming up a learning curve, the hardware devices out there are still struggling to adopt proper HTML5 support and decent performance. Those points alone lend credit to th…

Yes, but it will be ready, and the question is will devs and firms that have invested all their time into native development be ready too? It would be prudent to be ahead of the curve when the horizon is so clearly visible.

Re: Making Facebook's native mobile app faster using HTML5

#19

Nitro Javascript engine? It could be an important difference between this test and FB's app. Safari gets it. It seems ambiguous still whether UIWebView users get it. A more apples-to-apples comparison would be to put it in a iOS app running UIWebView and see if the performance is maintained. I'd certainly be interested in the results.

Performance is also great in a wrapped version. The bottleneck we had to solve was in event management, the GPU & compositor not in the JavaScript execution.

Re: Making Facebook's native mobile app faster using HTML5

#20
post #16

I suspect they misunderstood the "HTML5 is not ready" statement. Indeed, HTML5 can perform, and the future is bright. However, as plenty of people in the comments here have mentioned, for mainstream devices.. it's not ready. The frameworks are still coming up a learning curve, the hardware devices out there are still struggling to adopt proper HTML5 support and decent performance. Those points alone lend credit to th…

Yes, but it will be ready, and the question is will devs and firms that have invested all their time into native development be ready too? It would be prudent to be ahead of the curve when the horizon is so clearly visible.

It was also clearly visible 3 years ago. It's nice to be an HTML5 advocate, but lets be realistic, it's 3-4 years before HTML5 will be coming even close to native in performance or tooling.

In the meantime all those native developers will be kicking your ass in earnings and functionality.

Post reply on HN