Skip to content

Future Improvements

Andy Gill edited this page Jun 25, 2014 · 2 revisions

There are notes about improvements, etc. Functionality

Channels would reduce need to wait for Canvas to finish

newChan :: Canvas (Chan a)
putChan :: Chan a -> Canvas a -> Canvas () -- advantage, does not need to return to Haskell
getChan :: Chan a -> STM a

Many things could be returned in parallel.

sends :: DeviceContext -> [Canvas a] -> IO [a]

Optimizations

  • peep-hole style - remove strokeStyle "red" multiple times

Watch for concurrency issues! Can only yield for a non-() monadic function.

  • common up small sequences with new functions.
Clone this wiki locally