Conversation
63b61a9 to
c949950
Compare
Instead, only load table definitions and constraints when the table is created. This only impacts Odev's database, used for internal operations. Performance gains: - Framework loaded: 5ms (1.3%) - Framework started: 48ms (6.4%) - Execution completed: 46ms (5.5%)
Avoid some costly operations when update is not needed. Performance gains: - Framework loaded: 6ms (1.7%) - Framework started: 48ms (5.8%) - Execution completed: 51ms (6.5%)
Plugins where installed at every run of odev, taking a substantial amount of time. Also check for missing requirements before running `pip install`, as the operation is generally 50 times faster and can prevent running a useless install. Performance gains: - Framework loaded: 25ms (8.1%) - Framework started: 211ms (42.3%) - Execution completed: 184ms (31.1%)
Move some imports to lazy-load features only when required. Performance gains: minimal
We noticed the implematation of `functools.ttl_cache` was not fit with our needs and was failing to cache some subprocesses results.
This had an unnecessary toll on performances when listing databases.
Allow choosing a value for the bypass (do or do not).
Only run the subprocess once for all databases instead of once per database. This makes it more efficient if coupled with proper caching.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Improve performances of the framework.
Metrics below are gathered by running the same command 10 times and taking the average execution time, before and after changes.
Running
odev version:Running
odev run <database> --st:Running
odev ls(3 databases):Compliance
docsdirectoryrequirements.txtfile, if any