Skip to content
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

[Performance] Add --optimistic flag that skips DB checks #687

Merged
merged 1 commit into from Oct 5, 2023

Conversation

tadast
Copy link
Collaborator

@tadast tadast commented Oct 4, 2023

By default, when running SequenceServer.init i.e. when starting the web server or runninc CLI commands, it will scan the entire database_dir entries to find databases that use older (v4) version or have been created without parse_seqids. If this is the case it will log a warning.

If all databases are formatted correctly and the user knows it, running SequenceServer with --optimistic can have a significant impact on reducing startup times. With vast databse directories this can be in tens of seconds.

This is because parse_seqids in particular does a lot of IO calls to scan database directories to determine if seqids metadata files are missing for each database.

I think this also constitutes a 2.2.0 gem release

@ghost
Copy link

ghost commented Oct 4, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

By default, when running SequenceServer.init i.e. when starting
the web server or runninc CLI commands, it will scan the entire
database_dir entries to find databases that use older (v4) version
or have been created without parse_seqids. If this is the case
it will log a warning.

If all databases are formatted correctly and the user knows it,
running SequenceServer with --optimistic can have a significant
impact on reducing startup times. With vast databse directories
this can be in tens of seconds.

This is because parse_seqids in particular does a lot of IO calls
to scan database directories to determine if seqids metadata files
are missing for each database.
@yannickwurm yannickwurm merged commit cb24bb3 into wurmlab:master Oct 5, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants