Live data from Hacker News

Are mobile web apps really slow?

danbricklin.com

11–20 of 58 posts

Re: Are mobile web apps really slow?

#11
This is a post responding to the following article that was posted on HN yesterday-ish: http://sealedabstract.com/rants/why-mobile-web-apps-are-slow...

The point of that article was to specifically call out lazy surface-level discussions of HTML5/js apps by throwing out some benchmarks, and trying to have a practical fact-based discussion. I found the article very convincing actually, and what I wanted to see was both browser-app proponents and detractors testing out the limits of what the browser is capable of, so we can determine what is and is not viable to program in the browser stack.

This piece is simply not an answer to that article in any way. It does not attempt to answer the question posed in the title, nor does it address any of the points of it's parent article. I think we need to step up the level of discussion here if we want browser tech to be more viable for general use.

Re: Are mobile web apps really slow?

#12
post #5

> Browsers are constantly being upgraded more and more of this important functionality built-in, including rich-text editing I don't see any "rich-text editing" widgets built-in in browsers. And even if that was the case (that they are available in some) it has been 18+ years we've have had to put with BS solutions like the common "rich-text editors" found in most Content Management Systems: slow, buggy, crappy outpu…

What do you consider contenteditable=true if not a rich text editing widget?

Re: Are mobile web apps really slow?

#13
Anyone interested in optimising their mobile web applications should watch Apple's Safari tracks from this year's WWDC.

They have plenty of advice on improving general performance and how to use the WebKitInspector to measure performance problems.

Some key take aways:

Avoid using libraries (like jQuery) unless you really need them - It will reduce memory consumption significantly.

Be careful how often you're invalidating style/layout info and forcing recompilation.

Avoid using onscroll events to do layout. Especially when you're likely to inadvertently invalidate styles/layout at the same time e.g. accessing element offsets and positions

Re: Are mobile web apps really slow?

#15
Mobile performance has to do more with the expectations of multi-touch interaction for the user and less about the whole application simply being "slow". Very marginal differences in performance can have massive effects on the usability of apps on a mobile devices. For example - imagine the lock screen slider didn't follow your finger as you swiped, but slightly lagged behind. Would you know initially that it was even swipe-able if that were the case?

Re: Are mobile web apps really slow?

#16
post #7
post #2

So, one argument in favor of web apps is that many of the common, tough-to-program operations are carefully coded by top programmers who are devoting their careers to fine-tuning that operation. Browsers are constantly being upgraded more and more of this important functionality built-in, including rich-text editing Many tough-to-program things like rich text editing have also been implemented for you in native frame…

In these type of discussions they tend to selectively ignore all what the desktop has brought to the development and what is possible in native code frameworks.

As do the people on the other side of the discussion; it is really best to just ignore these discussions ;P.

Re: Are mobile web apps really slow?

#17
If I open iTunes on Windows and scroll through my music library (~20,000 songs) then move over to Google Play in chrome 28 and scroll through the same library, I notice very quickly that the native experience is undeniably better. I would estimate the total lag (between spinning the scroll wheel on my mouse and seeing the ui begin to scroll) is about 10 times as long on chrome.

Another example: try using any web based spreadsheet software after using Excel for a while. I guarantee that you'll be immediately frustrated with the web apps sluggishness.

Web apps are getting better, but anything that uses both the HID and graphics stacks is still way faster if native.

Re: Are mobile web apps really slow?

#18

This means that handling of modern cases (e.g., characters taking up more than one byte) happens naturally, efficiently, and hopefully more bug-free. This isn't true at all, right? JavaScript is missing fundamental Unicode support, like normalization or testing for canonical equivalence.

JavaScript doesn't even handle "characters taking up more than one byte" once you abstract to "more than one X" (or, alternatively, "more than two bytes"): JavaScript strings are really binary 16-bit numeric arrays, which frankly is even worse than using 8-bit numeric arrays as developers are much more likely to throw up their hands and claim "those characters don't happen often enough for me to dirty up my beautiful code" (the response I seriously got when I started working on patches to support UTF-16 for ACE; it was really annoying and horribly disappointing: they seemed to believe they could just ignore the problem in general and solve it at the edges, which is a total misunderstanding of the scope of the issue).

In essence, JavaScript's string is no better than C++11's std::u16string, and in fact is even worse as the language doesn't provide anything similar to std::codecvt, so you are stuck implementing UTF-16 conversions yourself in a language that doesn't even have an integral data type :(. (Incidentally, Java's String also sucks at this, so it isn't like the "native applications" side of this argument is doing so well, with C++ and Java both down for the count; only Objective-C has a real Unicode-compliant NSString class.)

Re: Are mobile web apps really slow?

#19
Huh. It's like he's saying (because of libraries in the web browser) that we should be benchmarking HTML5 the way that we would a C64 or an Amiga 500... not as a general purpose machine that can implement arbitrary algorithms, but as a crummy machine where all the magic is done in hardware (or, here, libraries).

Part of me wants to resist that frame. The whole point of browsers running (sandbox safe) arbitrary code is getting the benefits of arbitrary code, right? Who wants to distort their problem solving to conform to the ad hoc details of the current state of browser vendor libraries? Isn't that what we're trying to get away from?

But then a part of me thinks... we do that with GPUs too, right? If you benchmarked a modern game that didn't use the GPU (and didn't distort what work was done to accommodate the particularities of the how the GPU expects computation to happen), its performance would be relatively speaking even more dreadful. Just like a web app that doesn't lean heavily on the browsers' libraries.

Obviously there is a difference in that browser constraints are mostly social (and thus kind of arbitrary), and GPU constraints (and those of the C64, for that matter) seem to be responses to certain physical realities.

I guess in the short run, he has the right attitude if you want to make code that actually performs well today, but wrong if you think that putting political pressure on standards bodies and browser vendors by offering up critiques like the original article is likely to improve things.

Re: Are mobile web apps really slow?

#20
post #16
post #7

Earlier quoted context omitted.

In these type of discussions they tend to selectively ignore all what the desktop has brought to the development and what is possible in native code frameworks.

As do the people on the other side of the discussion; it is really best to just ignore these discussions ;P.

I do work on both sides, and my experience with web just makes me wish for native projects every time I change customer, but it does not always happen.
Post reply on HN