Skip to content

Strictness in node data type #7

Open
@mchakravarty

Description

@mchakravarty

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions