Hacker News new | ask | show | jobs
by jonathanleane 4384 days ago
I like your solution too - it 'gets you to the goods' much faster :) At the moment I feel like mine sort of overpromises and underdelivers, e.g. the style and features functionality doesn't work particularly well yet.

About the pre-loading, I'm actually already doing that... But only the next one in the queue. How many were you trying to load at once? I did notice that even only pre loading one is enough to slow it down considerably on my nexus 4 though...

1 comments

I think i was a bit too optimistic. I would load 5 iframes at once with 2 either side of the currently selected one. It was much quicker but I couldn't find a nice way to reduce resource usage; I think the browser still attempts to compute all those animations even when offscreen. Setting the dimensions to 1x1px for offscreen frames didn't do the trick; I tried going down to 3 and that still ended up in lots of CPU/RAM usage. I think it's probably do-able but would require some more tinkering.

BTW: I like your mobile/tablet previews. I was actually going to do the same but left it out for the moment :P

Yeah, I'm almost positive you're right about the animations, etc. still loading off-screen. I'm not sure how much of this is due just to javascript stuff going on vs. loading a bunch of things at once simply being really CPU intensive.

EDIT: Might be worth investigating the (dis)allow-scripts variable of the sandbox tag? Take a look at http://www.html5rocks.com/en/tutorials/security/sandboxed-if...