-
Notifications
You must be signed in to change notification settings - Fork 323
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
3% speedup with LazyMap and MetadataStorage #8359
Conversation
engine/runtime-parser/src/test/java/org/enso/compiler/core/IrPersistanceTest.java
Show resolved
Hide resolved
engine/runtime-parser/src/main/scala/org/enso/compiler/core/ir/IrLazyImMap.scala
Show resolved
Hide resolved
engine/runtime-parser/src/main/scala/org/enso/compiler/core/ir/IrLazyImMap.scala
Outdated
Show resolved
Hide resolved
var pass = meta.get(BindingAnalysis$.MODULE$); | ||
emitIOException(); | ||
return (BindingsMap) pass.get(); | ||
} catch (IOException ex) { |
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.
Lazy deserialization of BindingsMap
may fail: https://github.com/enso-org/enso/actions/runs/6974085571/job/18979188994?pr=8359#step:10:1073 - don't propagate the IOException
further.
u.compilationStage(CompilationStage.INITIAL) | ||
} | ||
) | ||
compiler.ensureParsed(mod) |
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.
Reparse without caching when lazy deserialization fails.
OK, we are green. Now we need to judge whether this change worths being integrated, @hubertp? ConsThe ProsWe can gain some speed. The base benchmark results are finally available. Let's schedule benchmark run with this PR - on develop: DecisionToday's a decision was made to integrate in spite of the "Cons". |
…4' into wip/jtulach/LazyMaps_8324
Pull Request Description
Shall optimize #8324 by making all deserialized
Map
implementations (both Java and Scala) lazy.Important Notes
I don't know how to convert Java
Map
to Scala immutableMap
without copying - e.g. lazily. Scala experts please advice!Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
style guides.