Skip to content

Comments

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

Merged
yannickwurm merged 1 commit intowurmlab:masterfrom
tadast:tt/optimistic-mode
Oct 5, 2023
Merged

[Performance] Add --optimistic flag that skips DB checks#687
yannickwurm merged 1 commit intowurmlab:masterfrom
tadast:tt/optimistic-mode

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.
@tadast tadast force-pushed the tt/optimistic-mode branch from 8b4f6a9 to f2cf7d0 Compare October 4, 2023 17:15
@yannickwurm yannickwurm merged commit cb24bb3 into wurmlab:master Oct 5, 2023
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.

2 participants