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

Optimize Model decoding #89

Open
dilation opened this issue Apr 17, 2020 · 0 comments
Open

Optimize Model decoding #89

dilation opened this issue Apr 17, 2020 · 0 comments

Comments

@dilation
Copy link
Contributor

dilation commented Apr 17, 2020

#87 improved the performance of Model decoding (i.e., the ModelRepr.toModel method). However it still seems slow.

Rudimentary profiling points to:

  • the Eval interpreter
  • lazy val initializers (some of them in Eval.Later)

We should identify whether the cause is synchronization of lazy vals, the Eval interpreter itself, or both (or something else).

Optimization ideas for the two cases:

  • Avoid Eval/State
    • would a simpler State help?
  • Thread-unsafe laziness, followed by safe publication (after decoding)
    • See some discussion about safe publication: https://github.com/scala/collection-strawman/issues/50
    • Some more reading: https://shipilev.net/blog/2014/safe-public-construction/
dilation added a commit to nokia/seals that referenced this issue Apr 20, 2020
- Optimize IdentitySet
- Cache Model hashCode in a lazy val
- Use Chain instead of Vector for Model paths
dilation added a commit to nokia/seals that referenced this issue Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant