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

Try to improve docker compose startup time #6

Open
JorisHeadease opened this issue Jun 12, 2023 · 3 comments
Open

Try to improve docker compose startup time #6

JorisHeadease opened this issue Jun 12, 2023 · 3 comments

Comments

@JorisHeadease
Copy link
Contributor

Currently, the spring boot applications take quite a long time to start up. Try to look into low-maintenance solutions that lower this startup time, for example use GraalVM.

@JorisHeadease
Copy link
Contributor Author

Found out the application startup initialised a GraphQL-related @Bean even though GraphQL was disabled for the project:
Screenshot 2023-07-07 at 14 51 38

After conditionally loading, a new top thread duration is added, but this contains items that have to be performed unlike before, and the load went from 8 seconds to 4 seconds (with the profiler attached):
Screenshot 2023-07-07 at 14 59 44

As for the local startup times without a profiler connected:
Before:

  1. 15.053
  2. 15.139
  3. 15.226

After:

  1. 13.26
  2. 13.751
  3. 13.594

@JorisHeadease
Copy link
Contributor Author

As for further improvements, ideally FHIR HAPI is upgraded to Spring Boot 3, so we can use AOT (Ahead of Time) compilation. I can imagine this taking quite a while though. It would be a major boost to the startup times though. I will check with the FHIR devs if they have plans to implement this anytime soon.

@JorisHeadease
Copy link
Contributor Author

The Spring upgrade seems to be planned for November '23 (quote below is from the google forms link)

https://chat.fhir.org/#narrow/stream/179167-hapi/topic/Spring.20Boot.203.2E0.2Ex
hapifhir/hapi-fhir-jpaserver-starter#473
https://docs.google.com/forms/d/e/1FAIpQLSc5roQSFdPpfDvm0JQ8RI4tVOTV-QgaNdk-Zh0e1rlmR5mP8Q/viewform

The Java EE spec has moved from the javax.* package namespace to the new jakarta.* namespace. HAPI FHIR will need to migrate to the new API and it is unfortunately not feasible to support both APIs long term. Migrating to the new API will be required in order to use HAPI FHIR with the current release of many popular frameworks including Spring 6, Spring Boot 3, and Hibernate 6.
This is a nontrivial change: It will require upgrades to Spring and Hibernate within HAPI FHIR. It will also require HAPI FHIR users to potentially upgrade their application servers, and rework any custom code (e.g. resource providers, interceptors) in order to use the new APIs.
Our current working plan is to make this upgrade as a part of our November 2023 release, with early access builds available before that time.

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

No branches or pull requests

1 participant