> 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?
Are mobile web apps really slow?
31–40 of 58 posts
Re: Are mobile web apps really slow?
#32This 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 bot…
The reason a veteran like Dan take issue with the hardware and performance side of things is that is what originally held back dynamic interpreted languages in the first place. There were a zillion arguments about how Smalltalk and Lisp were just too damn slow and would never be capable of the performance present in languages closer to the metal. Thought the 90s and the 00s these opinions were clearly rendered moot.
Also, lets think about where are problems are actually bound. With games, 3D rendering and graphics are a big pain point and developers spend a lot of resources to cordon off and optimize this code. And then they frequently use a language like Lua to do everything else. This is basically the approach of APIs like WebGL.
Re: Are mobile web apps really slow?
#33For me, it is not just that web apps feel slow. It is that they feel clunky . I can often see the UI elements being drawn one by one, the animations are rarely smooth, and the gestures (if I'm on mobile) never register as well as they do in native apps. The seams are showing. Even when native apps are slow, they can have a feeling of cohesiveness and polish that web apps lack.
The average native app doesn't really do that much app logic. I'd wager you can take almost any app in the App Store, rip its non-UI code out and replace it with JavaScript equivalents, and no one would be any the wiser.
We're talking about software that needs to respond in human-time. Taking a couple dozen milliseconds is not the end of the world.
What is the end of the world for these apps is laggy, unresponsive UI, and that's where hybrid web apps fall apart. Users are very timing-sensitive when it comes to visual elements. When I touch a button it should visually respond immediately, within at most a few milliseconds. Most web apps can't reach this level of performance.
Which leads to something from the article itself:
> "many of the common, tough-to-program operations are carefully coded by top programmers who are devoting their careers to fine-tuning that operation"
The problem with the web, as it pertains to UI, is that this isn't true. Take the dreaded carousel - that things needs to animate and scroll smoothly, but the code to do this isn't natively built into the platform, so everyone ends up rolling their own (or using what someone else has rolled) non-natively. And now you have shitty, laggy scrolling performance.
This goes double for webapps that pretend to be native. Now they're basically reimplementing all of the platform's native UI widgets in Javascript without the benefit of the legion of native platform developers who've smoothed out all the kinks.
Re: Are mobile web apps really slow?
#34The problem again is not really javascript, it is DOM manipulation. You can have the fastest javascript engine ever,if the bottelneck is the DOM , there is little you can do about it. And everybody doesnt own a quad-core mobile. I like Titanium approach where the ui is native and the code is javascript,so you are basically using javascript with a specific API,not the DOM. I'd like to see more frameworks like this , o…
Do you have any proof that DOM manipulation is slow? This is a common refrain that I've never seen proof of (other then anecdotally). There are folks saying that the DOM is fast, and how the JS we use to manipulate it is slow. http://blog.korynunn.com/javascript/the-dom-isnt-slow-you-ar...
Re: Are mobile web apps really slow?
#35The problem again is not really javascript, it is DOM manipulation. You can have the fastest javascript engine ever,if the bottelneck is the DOM , there is little you can do about it. And everybody doesnt own a quad-core mobile. I like Titanium approach where the ui is native and the code is javascript,so you are basically using javascript with a specific API,not the DOM. I'd like to see more frameworks like this , o…
Do you have any proof that DOM manipulation is slow? This is a common refrain that I've never seen proof of (other then anecdotally). There are folks saying that the DOM is fast, and how the JS we use to manipulate it is slow. http://blog.korynunn.com/javascript/the-dom-isnt-slow-you-ar...
Re: Are mobile web apps really slow?
#36Speed is only one of the tradeoffs. You also lose access to the native interactions, controls, transitions etc.., which makes a lot of the mobile web apps be very alien to the users since they don't really quite fit with the rest of the apps. I am curious, can anyone point to an well-done mobile web app? The best way to shut up all of us yelling "js is worthless for mobile development" is to point to such apps and ex…
Re: Are mobile web apps really slow?
#37Speed is only one of the tradeoffs. You also lose access to the native interactions, controls, transitions etc.., which makes a lot of the mobile web apps be very alien to the users since they don't really quite fit with the rest of the apps. I am curious, can anyone point to an well-done mobile web app? The best way to shut up all of us yelling "js is worthless for mobile development" is to point to such apps and ex…
Re: Are mobile web apps really slow?
#38For me, it is not just that web apps feel slow. It is that they feel clunky . I can often see the UI elements being drawn one by one, the animations are rarely smooth, and the gestures (if I'm on mobile) never register as well as they do in native apps. The seams are showing. Even when native apps are slow, they can have a feeling of cohesiveness and polish that web apps lack.
This really feeds into npalli's point above. Comparing native vs. web by simply comparing JS execution performance is a red herring. The average native app doesn't really do that much app logic. I'd wager you can take almost any app in the App Store, rip its non-UI code out and replace it with JavaScript equivalents, and no one would be any the wiser. We're talking about software that needs to respond in human-time.…
For instance, I've made a simple tic-tac-toe app that I have on my phone through Phonegap that uses nothing but canvas for rendering. It doesn't seem to have this built-in delay and the buttons are quite responsive.
I don't think your example of the carousel works because the article, I believe, was referring to the programmers that are working on the browser itself. You can't necessarily hold them responsible for performance issues derived from what other programmers are doing on the platform that may or may not be a good idea. Besides, I would imagine you could build a rather snappy carousel these days on modern browsers using CSS3 features as the bulk of the animation as they are native to the browser.
You are also comparing today's Javascript endeavors to those of native developers that have already had their issues worked out, as you say. It would only be fair to wait until current Javascript issues are worked out before doing a proper comparison. It would be like saying your car is the obvious choice for the race because it outperforms my car even though I've yet to put the tires on my car.
Native is the proper choice today, but who knows what tomorrow may bring?
Re: Are mobile web apps really slow?
#39The CTO of a company which makes a web platform for mobile development ( http://www.alphasoftware.com/products.asp ), thinks mobile web apps are good enough? What a surprise...
I'm not sure the cynicism is warranted. Dan does a bunch of native iOS development. He's got more experience than the vast majority of people who read this site. This isn't some random brogrammer writing a post about JavaScript. Dan Bricklin's resume rightfully could include the line "1979: Invented the spreadsheet".
Not to diminish his accomplishments, because I consider him one of my heroes, but he didn't invent spreadsheets. That honor would go to Richard Mattessich 18 years earlier.
Re: Are mobile web apps really slow?
#40It is a little disappointing that this doesn't directly address the issues with the original article's claims. Instead it continues focusing on CPU execution timings. Like many responses to the original article, the elephant in the room is javascript performance on DOM manipulation/UI. To take an example on the desktop, if I gave you two options a) language a which is about 2 times slower than C in doing some math op…
I beg to differ. In my current project, the client (written in JS) has about 10x as much non-UI code as the server. Currently this app only targets desktop platforms through a thin wrapper. When it's time to target mobile platforms, the UI will need to be native, or at least a mix of native and Web. I have no plan to rewrite all the non-UI code twice, once in ObjC and once in Java. So we need a way to have a common, memory-safe language for non-UI client code, that can be shared between the major mobile platforms and the Web platform. I'm going to take another look at Titanium Mobile, though I don't like the way it attempts to provide a greatest-common-denominator API for the UI. I'd rather use the platforms' native UI APIs, in their native languages if necessary, while using a common language for non-UI code.