Re:Show HN: Themefinder – Interactively find wordpress themes
by jonathanleane on Monday June 16, 2014 @08:29AM
(#7898653)
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...
Re:Show HN: Themefinder – Interactively find wordpress themes
by mariovisic on Monday June 16, 2014 @08:47AM
(#7898719)
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
Re:Show HN: Themefinder – Interactively find wordpress themes
by jonathanleane on Monday June 16, 2014 @08:57AM
(#7898764)
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...
For the speed issue; I was playing around with an idea of preloading the iframe previews to speedup loading; it worked but the browser would crash due to high CPU/memory usage eventually. Maybe you'll have better luck?