-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Break up generated Rust code into three crates.
This patch continues the effort to speed up re-compilation of DDlog programs. A recent commit enabled incremental Rust compilation, which in theory means that the compiler should be able to intelligently re-compile only parts of the program that changed. While incremental compilation does have some clear benefits, it is quite fragile with small changes (e.g., adding an empty line can trigger a long re-compilation). To improve things further, we take advantage of the fact that with incremental compilation Rust performs LTO at the granularity of a crate; thus by splitting the code into several crates we can more reliably contain the effect of each change on compilation time to the crate(s) that changed. Concretely, we break the generated code up into three crates: * 'types' crate containing DDlog type declarations and all imported Rust library code. * 'value' crate that declares relations and value types. * 'main' crate that contains rule definitions in Rust and imports the other two crates. Some results using the `ovn-northd-ddlog` test case: - Complete recompilation from scratch: 10m 21s - Remove a rule and recompile: 0m 36s - Add a rule and recompile: 0m 37s - Add a new relation (and no rules): 5m 53s - Add a rule for the new relation: 0m 38s - Modify a function 0m 46s
- Loading branch information
Showing
19 changed files
with
583 additions
and
371 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
Oops, something went wrong.