Stream: hapi
Topic: hapi-fhir: issue 281: Performance issues with jpa server ...
Zulip HAPI Bot (Jan 12 2016 at 12:02):
ftprod opened issue 281
I encounter performance issues with the 1.3 version of the jpa server.
## Use case:
I create or update Patient (for example). Patients contain only some data (name, birthdate, gender...) and often a link to an existing practitioner.
I use an "api transaction" to insert 50 Patients at a time.## Single Patient insert time :
- v1.3: 160ms
- v1.2: 6ms## Environment :
Apache Tomcat 8
Mysql server 5.6
Java jdk oracle 8We tested that on 10k entries with the same result.
So we have to rollback to v1.2.
Zulip HAPI Bot (Jan 12 2016 at 12:26):
jamesagnew commented on issue 281
Hi @ftprod,
This is interesting, thanks for providing numbers. The main difference between 1.2 and 1.3 is the addition of Hibernate Search (lucene) indexing for fulltext search. I wonder if this is the culprit.
Can you try re-running your tests with hibernate search disabled? You can accomplish this by setting the property
hibernate.search.autoregister_listeners
tofalse
. If you're using Spring Java configuration, you can set this in your jpaProperties() method, e.g.private Properties jpaProperties() { Properties extraProperties = new Properties(); extraProperties.put("hibernate.dialect", org.hibernate.dialect.DerbyTenSevenDialect.class.getName()); extraProperties.put("hibernate.format_sql", "true"); extraProperties.put("hibernate.show_sql", "false"); extraProperties.put("hibernate.hbm2ddl.auto", "update"); extraProperties.put("hibernate.jdbc.batch_size", "20"); extraProperties.put("hibernate.cache.use_query_cache", "false"); extraProperties.put("hibernate.cache.use_second_level_cache", "false"); extraProperties.put("hibernate.cache.use_structured_entries", "false"); extraProperties.put("hibernate.cache.use_minimal_puts", "false"); extraProperties.put("hibernate.search.default.directory_provider", "filesystem"); extraProperties.put("hibernate.search.default.indexBase", "target/lucenefiles"); extraProperties.put("hibernate.search.lucene_version", "LUCENE_CURRENT"); extraProperties.put("hibernate.search.autoregister_listeners", "false"); // set to false to disable lucene return extraProperties; }
Zulip HAPI Bot (Jan 12 2016 at 16:55):
It is difficult to test in my context because the application makes a search before an insertion (and the search doesn’t work with autoregister_listeners=false).
But, my first impression is that didn’t change the insertion time (more than 100ms).
I can make other test / investigation if you want.
Zulip HAPI Bot (Jan 12 2016 at 19:53):
jamesagnew commented on issue 281
Hmm, maybe that's not the bext way to disable lucene then..
Can you try it with:
extraProperties.put("hibernate.search.indexing_strategy", "manual");
Zulip HAPI Bot (Jan 29 2016 at 17:11):
Sorry for my late reply.
I tried this setting , but the result is similar.
Last updated: Apr 12 2022 at 19:14 UTC