Ok thanks, I'll keep measuring until I'm sure where the problem come from.

We have games like Rock Paper Scissors or blind test so it's not a
rendering performance problem but more a time to load/time to first render
problem.
For quick context, those are simple games for video game streamers on
twitch.tv that need to interact/play with their viewers.

Colin, I'm using advanced compilation, I don't have any code nor atom
shared between frames. I have 6 iframes atm, one per game.
The average size of each bundled js is 1.4M where at least 1M is common
libs like React, reagent, reframe, core async ... (estimated based on the
fact that some game only have 200 lines with no extra dependencies and
still get 1.2M)

"iframe, really ?"
I could try to remove iframes and go with 1 page but then the build would
be harder because some games are in pure js, other coffee etc ... I'm the
only one using clojurescript in the team atm.
Some games are also played in standalone with their own URL.
That's mainly for those 2 reasons that the iframes made sense for us but I
would really like to discuss other possibilities.

On Sat, Sep 26, 2015 at 5:58 PM, Alan Moore <[email protected]>
wrote:

> Yes, you would be surprised at where all the time goes...
>
> As Colin said, my advice is to measure everything using something like
> chrome tools, react's chrome tools or wireshark to find out how long each
> operation is taking.
>
> If it turns out not to be the network you could be reaching a worst case
> with react and/or reagent. Maybe your games are too complex for the
> differencing algorithm and too much is changing each frame or you aren't
> using key= properly. One copy may work fine but maybe it doesn't scale. The
> react chrome tools should help you figure out what is going on.
>
> Surprisingly, iframes can come in handy but less so as a UI feature and
> more as a performance tool. We have a page that has to display a small
> window of uncompressed video from a web socket onto a canvas element at
> 16-24 frames/sec and doing this in the main page/thread sucked up so much
> cpu that other background processing on the page was delayed or blocked and
> we were forced to move it to its own iframe. Most browsers give each page
> at least one thread, including iframes. YMMV.
>
> Good luck.
>
> Alan
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "ClojureScript" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojurescript/wiCdwrjjAQ8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/clojurescript.
>

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to