Page 1 of 1
Technical Details on Slow Thread With Many Embedded SGFs
Posted: Sun Aug 02, 2020 8:40 am
by hyperpape
We have a thread that takes an extremely long time to render:
viewtopic.php?f=13&t=17570. It has dozens of SGFs, and takes around a minute to fully render on my 2015 MacBook (though I might have some background stuff or other things that inflate that number). I thought I'd make a thread to record any technical discussion and not pollute the main thread.
I thought using
Re: Technical Details on Slow Thread With Many Embedded SGFs
Posted: Sun Aug 02, 2020 9:43 am
by hyperpape
Looks like the eidogo iframe is added to the page using document.write. I wonder if we could do a hack, and leave the document.write calls there, but write a dummy element, then attach an event handler for DomContentLoaded and then replace the element with the iframe. (Note: DomContentLoaded is available in IE9 and up, so we'd be losing eidogo support for IE 7 & 8, but do we care?).
The other question is whether making some of the eidogo scripts async would be helpful at all. It would presumably make the posts show up earlier, but it's not clear to me whether it would make the overall time to render any better.
Re: Technical Details on Slow Thread With Many Embedded SGFs
Posted: Sun Aug 02, 2020 9:49 am
by Ferran
IME, It starts slowing down on REload, but does the first render decently.
I tried using hide on the first league, IIRC, but something wouldn't let me. Can't recall what. Time permitting, I'll try to substitute the files with the trimmed games and link to the game page on OGS. Right now, however, I'm not even following the game. They're on move 150+ of today's first game, but I have something else that IRQs me.
Take care