[infinispan-issues] [JBoss JIRA] (ISPN-7122) JpaStore Performance is Poor

Sanne Grinovero (JIRA) issues at jboss.org
Thu Sep 28 06:24:00 EDT 2017


    [ https://issues.jboss.org/browse/ISPN-7122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13469693#comment-13469693 ] 

Sanne Grinovero commented on ISPN-7122:
---------------------------------------

Hi [~tuomas_kiviaho], the second level cache stores the SQL results and not the materialized objects so that would be safe.

Be careful with what you mean by "detach" ? The mapping configuration are allowed to control settings such as cascading for eviction, so evicting one object might still leak some of its related objects. The only safe operation is to {{clear}} the {{Session}} (or {{EntityManager}}), or close it.

P.S. don't worry about the use of deprecated criteria queries. That's just a warning from the Hibernate ORM team that this API will get removed in the next major version, but it's still working fine.

> JpaStore Performance is Poor
> ----------------------------
>
>                 Key: ISPN-7122
>                 URL: https://issues.jboss.org/browse/ISPN-7122
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Loaders and Stores
>    Affects Versions: 8.2.4.Final
>            Reporter: Dan Siviter
>            Assignee: Ryan Emerson
>
> When using the {{JpaStore}} it load's IDs, then iterates around the result and manually getting the record. This means for large datasets the performance is really poor. There is a comment in the code regarding this, but in it's current state it effectively makes it unusable.
> As an example with a dataset of 12,600 records using a a generic but customised JPA:
> * Bulk load: 977ms,
> * {{JpaStore}}: 137,906ms
>  
> Increase: 14,015%
> Obviously paralleling the call or another DB might be quicker, but not much!
> Would it possible to have some level of chunking/batching of the load? IMO this would be a suitable compromise.
> I'm afraid I can't share the code for my loader, but it is loading a simple entity with no referenced objects, no so no joins.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the infinispan-issues mailing list