Compositional / servant-client-jsaddle

Automatic derivation of API clients for GHCJS, GHC + WebKit, GHC + Websockets, etc
Other
3 stars 2 forks source link

Use typedarray constructor instead of `B.copy`? #4

Open roberth opened 6 years ago

roberth commented 6 years ago

The request body gets copied before send. This may be more efficient in case of jsaddle-warp but possibly not on GHCJS. Also we're assuming offset = 0 and length is appropriate. B.copy seems to guarantee that, but can we be sure?

roberth commented 6 years ago

Borrow this? https://github.com/reflex-frp/reflex-dom/blob/2e45e1eaa1896a12fd5ced9f9971b250f3f535a8/reflex-dom-core/src/Foreign/JavaScript/Utils.hs