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

JPA async path is slower now that is synchronous #3664

Closed
michaelabuckley opened this issue Jun 1, 2022 · 3 comments · Fixed by #4174
Closed

JPA async path is slower now that is synchronous #3664

michaelabuckley opened this issue Jun 1, 2022 · 3 comments · Fixed by #4174

Comments

@michaelabuckley
Copy link
Contributor

michaelabuckley commented Jun 1, 2022

Describe the bug
The JPA persistence provider became slower when the async cached query threadpool was removed.

To Reproduce

Steps to reproduce the behaviour:

  1. Install 5.3
  2. Load some synthea data
  3. Make a query that returns more that 500 results. E.g. /Observation?status=active
  4. Upgrade to 6.0
  5. Compare results
  6. The new server is much slower. E.g. 200ms vs 30ms.

Expected behaviour

Sub 50ms response

Environment (please complete the following information):

  • HAPI FHIR Version 6.0 vs 5.3
  • Postgres
@michaelabuckley
Copy link
Contributor Author

This one looks related - #866

@jamesagnew
Copy link
Collaborator

That #866 suggestion is a really good one.

@michaelabuckley
Copy link
Contributor Author

This bug got fixed elsewhere by limiting the ES prefetch- #860

See also #536

A modification of #866 is drop the pid, and use a composite PK - (search_pid, search_order). Both of these are known at insert time, and they are small.

Need to test if the inserts are actually batched, and turn that on by default in our props.

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 a pull request may close this issue.

2 participants