On Monday, July 17, 2017 at 9:19:00 AM UTC-5, Marek Fajkus wrote:
>
> Sometimes you don't need subscriptions if you're in some state. For 
> instance, if you have game and subscription to say mouse position you can 
> subscribe to Mouse.position only when a user is in play state and avoid 
> subscription in game menu.
>
Because the game menu would only need to detect clicks and not positions? 
and/or would be made out of HTML with buttons that have an attached 
'onClick' event. (Thus freeing you from needing to subscribe to even 
'Mouse.clicks', right?)

On ... art yerkes wrote:
>
> Updates take CPU time, heat up your user's laptop, reinvigorate cold 
> memory, often when your user is trying to use their computer for other 
> things.  If running some code won't be useful, you should avoid running 
> it.  It also saves the environment just a tiny amount.
>
Ah, okay, so there is a performance advantage.

On ... Aaron VonderHaar wrote:
>
> Another example is a package like WebSocket, where the package will open a 
> network connection while you are subscribed and close it when you stop 
> subscribing.
>
Interesting.

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to