Skip to content

Instantly share code, notes, and snippets.

@thearthur
Created April 11, 2017 17:29
Show Gist options
  • Save thearthur/62b4fda0ca0978e55044d084a71f017c to your computer and use it in GitHub Desktop.
Save thearthur/62b4fda0ca0978e55044d084a71f017c to your computer and use it in GitHub Desktop.

badness: starting metabase is slower than it has any good reason to be.

unfounded assumtions: Speed up access to liquibase changelog

stuff we know:

possbile solutions

Don't have this problem

Stop having this problem by just maintaining one file

limit the number of migration scripts we keep

  1. define "save point" major releases

  2. upgrades would only be possible in a limited window of these releases.

Solve this problem

Hack Around the problem

Hook Liquibase at runtime to turn the caching back on

  1. This is fragile and almost certinaly bad.

Fix the problem in Liquibase

They had a problem with cach invalidation (which is the #2 problem in Computer Science after naming things, after naming things ;-) They fixed it by turning off the cache.

  1. Remove their Hack and turn the cache back on

    They are unlikely to want to merge this patch. leads to perma-fork and more work for us.

  2. Find a better method for Liquibase to clear the cache at the start of import

    I could be misinterpreting the problem they where trying to solve If this works then they are more likely to take the patch because it makes their library faster

add one more layer of abstraction

This solves all computer problems after all!

  1. Compile time preprocessing

    1. preprocess the migration blobs from one blob per file to many blobs in a single file
  2. runtime preprocessing

    1. move the migration scrips to a secure temp folder before each migration

    2. preprocess the migration scripts into a single file in a temporary resource or file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment