Drew Crawford writes long technical essays on mobile performance, self-hosted email, software practice and other programming topics.
Commenters call his mobile web apps piece an excellent writeup on JavaScript speed and garbage collection, and recommend his email server guide as easy to follow.
Hi Drew,
I read your new post on your blog:
http://sealedabstract.com/?p=515
And I must say, to anyone that is thinking of getting someone to develop an iPhone app, this is a must read!!!!
So, regarding that post, I have a couple questions. First, for context, I should mention, I am a developer myself (.Net), I read tons of blogs, I have casually read a fairly large amount of iPhone development related articles (just as they come through places like HN, not because of research).
So, a few questions if you don't mind, I have a feeling now that I am quite naive regarding the iPhone:
* developing on the iPhone, memory management, the issue with unknown screen size, etc....this gives me the impression that iPhone development is really quite "archaic" low level stuff...ie: nothing is easy or can be taken for granted. I would have thought that despite being a low power platform, no garbage collection, C Language, etc that Apple would have to a great degree abstracted a lot of this away. For example, my take a photo and upload requirement....I would have thought that there would be some sort of a Camera Control that could be embedded in a form, that would then inherit the inherent functionality of the control, and after the photo is taken, you would then have code that decides what to do with it (save, upload, etc) Do you really have to do great amounts of memory related programming to do this kind of task?
* The App store - I have read the horror stories and don't doubt…
You may or may not have seen it already, but in case you haven't, I'll link here the "How to NSA-proof your email" howto [1] someone just posted in the "Gmail was down" thread. Regardless of how you feel about the Black Chamber, it's an excellently well-written document on setting up your own mail-serving VPS using postfix and dovecot; the filesystem-level encryption stuff is trivially severable, and constitutes about 80% of what I'd have written (but not as well) had I not found this first. The other 20% would be setting up Baïkal for CalDAV/CardDAV service, but that's pretty straightforward and well described in the Baïkal Github repo.
(Minor quibbles about the HOWTO: I'm not sure Solr is really necessary; Dovecot seems to give me full-text search for free via IMAP. Also, I tried Z-push and it worked, but didn't support message flags, which I require, and I got tired of push pretty fast anyway. It works, and might've added message flags in the years since I tried it, but it's by no means required. Still, an excellent document, which I unreservedly recommend.)
[1] http://sealedabstract.com/code/nsa-proof-your-e-mail-in-2-hours/
I haven’t followed recent development of JavaScript all that closely so my knowledge is somewhat outdated. However, the optimisations that make JS performance close to C in some cases are really recent. Some of the tricks are old, such as the paper you cited. But these tricks only go so far, and in particular even modern GCs simply work badly in memory-constrained environments, which puts a hard upper limit on the amount of memory that JavaScript can handle efficiently. One of the better articles on this subject is [1].
That said, my comment already mentioned that local variable lookup isn’t a problem in JavaScript. It is in R, however; see my example in [2]. Beyond that, both R and Python execution have obvious optimisation potential, which is made hard by the fact that existing libraries rely extensively on implementation details of the current interpreters.
[1] http://sealedabstract.com/rants/why-mobile-web-apps-are-slow/
[2] https://news.ycombinator.com/item?id=11117070
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.
You're only seeing the alleged benefits from GPL, without factoring in its costs. Everything is a tradeoff. Some companies don't touch GPL code, which means those projects receive less support than they would with a more permissive license such as MIT/BSD. You're claiming GPL "[encourages] organisations to release their code under a similar license". I'm saying it often discourages organisations from ever touching GPL code and picking other libraries instead.
People have been writing about this in way more detail for a long time. If you're really trying to understand some position you can't possibly fathom and not just argue, then I'd point you to one post from 15 years ago: https://sealedabstract.com/rants/why-the-gpl-sucks/index.html
> , modern generational GCs overhead is typically very small (<5%) with only 20-50% more memory than the live set size, not 3-5x as the paper claims.
Another set of GC tests mentioned by the famous Drew Crawford article [1] said 4x to 6x was the sweet spot. A followup commenter wanted to clarify that the "best GC algorithms" worked within 2.5x. Whether its 2.5x or 4x, it's a counterpoint to the claims of only 50% more memory. Perhaps there are drastically different workloads skewing the tests. (I didn't thoroughly read both cited papers.)
[1]
http://sealedabstract.com/rants/why-mobile-web-apps-are-slow/