Faster startup time

I’ve been investigating the startup time of a bare-bones Camunda Platform process engine (no job executor, history cleanup etc) to try and reduce it. On my box it takes a little over 5 seconds with a local Postgres backend. I’ve tried some things already, such as removing the BootstrapEngineCommand and blocking telemetry, but the logging still shows a 3 second period where nothing happens. Can anyone enlighten me what happens in that 3 second period?

// logging
2021-04-01 11:34:28.949 {} DEBUG com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Fill pool skipped, pool is at sufficient level.
2021-04-01 11:34:29.149 {} INFO  org.camunda.feel.FeelEngine - Engine created. [value-mapper: CompositeValueMapper(List(org.camunda.feel.impl.JavaValueMapper@7d2a6eac)), function-provider: org.camunda.bpm.dmn.feel.impl.scala.function.CustomFunctionTransformer@3003697, clock: SystemClock, configuration: Configuration(false)]
2021-04-01 11:34:29.266 {} DEBUG org.camunda.bpm.engine.cfg - ENGINE-12004 Database product name PostgreSQL
2021-04-01 11:34:29.266 {} DEBUG org.camunda.bpm.engine.cfg - ENGINE-12005 Database type postgres
2021-04-01 11:34:29.854 {} DEBUG org.apache.ibatis.logging.LogFactory - Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter.
2021-04-01 11:34:32.679 {} DEBUG org.camunda.bpm.engine.cmd - ENGINE-13005 Starting command -------------------- SchemaOperationsProcessEngineBuild ----------------------
2021-04-01 11:34:32.682 {} DEBUG org.camunda.bpm.engine.cmd - ENGINE-13009 opening new command context
2021-04-01 11:34:32.699 {} DEBUG org.apache.ibatis.transaction.jdbc.JdbcTransaction - Opening JDBC Connection    ....

// code
HikariConfig config = new HikariConfig();
config.setJdbcUrl("jdbc:postgresql://localhost:5432/camunda");
config.setUsername("postgres");
config.setPassword("<pw>");
config.setMinimumIdle(1);
config.setMaximumPoolSize(10);
HikariDataSource ds = new HikariDataSource(config);
// various stuff to remove telemetry/history
ProcessEngineBootstrapCommand bootstrapEmpty = new ProcessEngineBootstrapCommand() {
  @Override
  public Void execute(CommandContext commandContext) {
    return null;
  }
};
StandaloneProcessEngineConfiguration processEngine = new StandaloneProcessEngineConfiguration() {
  @Override
  protected void initTelemetry() {
  }

  @Override
  protected void initTelemetryData() {
  }
};
processEngine.setDataSource(ds);
processEngine.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_FALSE);
processEngine.setJobExecutorActivate(false);
processEngine.setProcessEngineBootstrapCommand(bootstrapEmpty);
processEngine.setHistoryCleanupEnabled(false);
processEngine.setProcessEngineBootstrapCommand(bootstrapEmpty);
processEngine.buildProcessEngine();

As can be seen in the logging, there is a three second gap before ---SchemaOperationsProcessEngineBuild--- is printed. What happens at that point?

I think this may be due to parsing MyBatis mapping data. It does seem very slow though. Any thoughts?