Hacker News new | ask | show | jobs
by mariovisic 4382 days ago
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

1 comments

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