-
-
Notifications
You must be signed in to change notification settings - Fork 648
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
repair and performance improvement for
require
traversals
The `namespace-attach-module` function did not work right for a module dependency that runs code at a phase level shifted to phase 0 while the module's instantiation phase is non-0. Internally, `require` module-name resolutions are cached differently so that they can be shared as modules are attached. This change can greatly reduce calls to the module name resolver when creating many sandboxes for the same language, such as when rendering documentation. Unnecessary traversal of module requires is now skipped in the case of visiting available modules. In addition, a new `#:flatten-requires` option in the `#%declare` form provides a hint that it's worth flattening the tree of requires within a module's compiled form. This flattening is now always a win; if two modules that have flattened `require`s share a large subtree, and if those two modules are required by a third, then instantiating the third can be slower than without flattening. Flattening sparingly at the level of modules that are often attached to oter namespaces, however, is likely to be worthwhile. The `racket/base` module is marked `#:flatten-requires`, and that helps make `(make-base-namespace)` twice as fast as before.
- Loading branch information
Showing
39 changed files
with
8,951 additions
and
6,074 deletions.
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
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
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
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
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
Oops, something went wrong.
a847564
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.
Note on the commit message: "This flattening is now always a win" has a typo. It should be "This flattening is not always a win"