Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Curiously, we tried this and backed away to using AJAX calls returning pre-rendered html fragments in a recent project.

If you're building a mobile site, and want to target low-end Android devices (our "crappiest-phone-test-device" was a Huawei U8180), you really don't get a lot in the way of JSON parsing or DOM manipulation performance.

I wonder what (if anything) LinkedIn are doing for mobile?




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...


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?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: