-
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
cd5e645
Make java.util.Map lazy. Try to make immutable Scala map lazy.
JaroslavTulach d7f9af5
Attempt to create immutable map delegate
JaroslavTulach f9c34a9
Fix the proxy map to be immutable and lazy
hubertp f428331
Hexadecimal version looks more professional
JaroslavTulach 3ca2d66
Support serialization of singletons
JaroslavTulach af04b8e
Generate @Override annotation
JaroslavTulach 228a03f
Read MetadataStorage lazily
JaroslavTulach cac8910
Enough to use constructor
JaroslavTulach b8d5efd
Drop caches and reparse when deserialization of BindingsMap yields an…
JaroslavTulach d8148c1
Avoid deprecated method
JaroslavTulach cd6c0c6
Let getBindingsMap() recover from cache loading errors
JaroslavTulach 826dcee
SerializerTest needs FullyQualifiedNames serialization
JaroslavTulach ca5c256
Reverting cd6c0c6e4689c374aecacda52e329ce0557a0e51 as it causes failu…
JaroslavTulach 8bd6adc
More robust ImportResolver
JaroslavTulach 68e057f
Display error when the execution isn't Success
JaroslavTulach 1b3db21
Merge remote-tracking branch 'origin/develop' into wip/jtulach/Benchm…
JaroslavTulach 44b37c7
Benchmark on files that are already prepared in the repository
JaroslavTulach 868793a
Merge remote-tracking branch 'origin/wip/jtulach/BenchmarkStartup_832…
JaroslavTulach File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ | |
import org.enso.pkg.Package; | ||
import org.enso.pkg.QualifiedName; | ||
import org.enso.polyglot.CompilationStage; | ||
import org.enso.polyglot.LanguageInfo; | ||
import org.enso.polyglot.data.TypeGraph; | ||
|
||
import com.oracle.truffle.api.TruffleFile; | ||
|
@@ -374,12 +375,19 @@ public QualifiedName getName() { | |
@Override | ||
public BindingsMap getBindingsMap() { | ||
if (module.getIr() != null) { | ||
var meta = module.getIr().passData(); | ||
var pass = meta.get(BindingAnalysis$.MODULE$); | ||
return (BindingsMap) pass.get(); | ||
} else { | ||
return bindings; | ||
try { | ||
var meta = module.getIr().passData(); | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. Lazy deserialization of |
||
var logger = TruffleLogger.getLogger(LanguageInfo.ID, org.enso.interpreter.runtime.Module.class); | ||
var msg = "Cannot read BindingsMap for " + getName() + ": " + ex.getMessage(); | ||
logger.log(Level.SEVERE, msg); | ||
logger.log(Level.FINE, msg, ex); | ||
} | ||
} | ||
return bindings; | ||
} | ||
|
||
@Override | ||
|
@@ -447,4 +455,7 @@ public String toString() { | |
return sb.toString(); | ||
} | ||
} | ||
|
||
private static void emitIOException() throws IOException { | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.