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

Improve build performance #112

Merged
merged 1 commit into from
Nov 26, 2024
Merged

Improve build performance #112

merged 1 commit into from
Nov 26, 2024

Conversation

rkrage
Copy link
Contributor

@rkrage rkrage commented Nov 26, 2024

This diff is basically impossible to view, but the TLDR is that I moved the following utility methods out of the PgHaMigrations::AllowedVersions::ALLOWED_VERSIONS loop:

  • safely_acquire_lock_for_table
  • adjust_lock_timeout
  • adjust_statement_timeout
  • ensure_small_table

These methods do not exercise any of the backwards compatibility features of migrations, so we shouldn't need to run the tests for each migration version. The safely_acquire_lock_for_table tests are very slow, so this should hopefully speed things up significantly.

@rkrage rkrage changed the base branch from master to rails-8 November 26, 2024 16:21
@rkrage
Copy link
Contributor Author

rkrage commented Nov 26, 2024

Before:

Screenshot 2024-11-26 at 10 31 34 AM

After:

Screenshot 2024-11-26 at 10 31 41 AM

@rkrage rkrage marked this pull request as ready for review November 26, 2024 16:33
@jcoleman jcoleman merged commit 58d303b into rails-8 Nov 26, 2024
65 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.

2 participants