Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strictness in node data type #7

Open
4 tasks
mchakravarty opened this issue Sep 2, 2016 · 0 comments
Open
4 tasks

Strictness in node data type #7

mchakravarty opened this issue Sep 2, 2016 · 0 comments

Comments

@mchakravarty
Copy link
Owner

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 Node components strict (at least those of elementary type, but maybe also some frequently modified ones of Point, 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 for Scene.)

This balances thunk creation and entering overhead with the overhead of marshalling elementary values that are not ending up being changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant