-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Load DSL compilers and extensions ahead of time in add-on mode (#2152)
### Motivation While profiling DSL generation in the add-on, I noticed we were spending a lot of time running `Dir.glob`. The code path that lead to invoking `glob` multiple times was loading DSL compilers and extensions, which invokes both `glob` directly and `Gem.find_files` (which invokes `glob` under the hood). There's no point in reloading DSL compilers and extensions every single time. We can load it once and then the forked process will have all of the expected classes loaded already. ### Implementation We need to use the workspace path declared by the editor to load all of this (which may not match `Dir.pwd`), so I made a new notification in the server add-on. It gets invoked once after boot. The other side of the change is to stop loading the compilers and extensions in the regular DSL path, which how we can save some time.
- Loading branch information
Showing
5 changed files
with
36 additions
and
19 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