Hacker News new | ask | show | jobs
by bigiain 5302 days ago
Nice link, thanks.

It doesn't address the problem we bumped into though. When a page needs a significant amount of content updated, sending that as structured JSON to a low powered Android device (or sometimes even an iPhone2 or a non S 3G) and then parsing that JSON and updatng the DOM was _way_ slower than sending back HTML and just replacing an elements innerHtml. For small tasks (like the personalisation {'name':'John'} example) we could make the JSON approach work, but updating a ~25row 4column list? Not on the cheap Android devices...

1 comments

What do you mean by 'significant amount of content'? Inserting html is of course faster than rendering in the client, but the javascript involved here is not slow - I haven't seen anything over 15 ms yet for rendering a fairly complicated page (I'm using a resig-style microtemplate, which is probably faster).

Are you perhaps constructing the nodes on the document, instead of doing them off the tree and then inserting/replacing them all at once?