Skip to content

Reduce the number of queries to retrieve stored data #257

Description

@DropSnorz

Since most calls to the data storage (h2) are now using JPA criteria API, most annotations on the model like FetchType.EAGER are ignored.

Entity fetching must be managed at the repository/DAO level. Now, there are some N+1 queries triggered that can impact performances for large Plugin , Project or Packages collections.

Queries must be optimized with following priority:

  1. Plugins related queries
  2. Daw Project related queries
  3. Packages (Explore Tab) related queries

For Packages, implementing pagination at the data fetching level can also improve performance. The pagination is implemented at UI level for now. This change is out of scope for this issue.

For Packages, multiple child lists must be resolved. Multiple subqueries can be used following recommendations in this SO thread : https://stackoverflow.com/questions/4334970/hibernate-throws-multiplebagfetchexception-cannot-simultaneously-fetch-multipl/51055523#51055523

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions