-
Notifications
You must be signed in to change notification settings - Fork 326
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
Resolve imports and exports via cached BindingsMap #8160
Resolve imports and exports via cached BindingsMap #8160
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement. Approving, although I would appreciate more clarity (more docs).
engine/runtime/src/main/java/org/enso/interpreter/runtime/TruffleCompilerContext.java
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/java/org/enso/interpreter/runtime/TruffleCompilerContext.java
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/java/org/enso/interpreter/runtime/TruffleCompilerContext.java
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/scala/org/enso/compiler/phase/ImportResolver.scala
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the reasons for additional ensureParsed
calls
engine/runtime/src/main/java/org/enso/interpreter/runtime/TruffleCompilerContext.java
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/scala/org/enso/compiler/SerializationManager.scala
Outdated
Show resolved
Hide resolved
current, | ||
{ u => | ||
u.bindingsMap(concreteBindings) | ||
u.loadedFromCache(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we maybe have more than 2 states? It feels like 1) not yet loaded
2) loaded only bindings
3) full IR loaded
would be more appropriate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is nobody reading the "three states" yet. Why shall we keep three states in memory when we only read two?
Pull Request Description
Addresses #6100 a bit.
org.enso.compiler.Compiler.runImportsAndExportsResolution
used to take up to three seconds as it triggered deserialization of megabytes ofIR
caches. Now it is faster as it uses library bindings cache. Alas, overall time isn't shortened, as further compiler passes still load (the same amount of)IR
caches in.Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,