-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
Description
At the moment, it makes no sense to make the fields of Node components strict as we exploit laziness for lazy marshalling back to Haskell. However, the following would be even better.
- Make all
Nodecomponents strict (at least those of elementary type, but maybe also some frequently modified ones ofPoint,Rect, and so on types). - Marshal all strict components eagerly from ObjC to Haskell (in one foreign call!) and keep the rest being marshalled lazily.
- Set the eagerly marshalled components on the ObjC object only if they changed in the Haskell world (using comparisons on the elementary types, rather than on thunk references).
- Do the same for
Scene. (Maybe even do it first forScene.)
This balances thunk creation and entering overhead with the overhead of marshalling elementary values that are not ending up being changed.