Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Inefficent initialisation of SortFieldList and other QueryPartLists #4664

@lukaseder

Description

@lukaseder

Currently, all QueryPartLists, and specifically the SortFieldList are initialised eagerly, allocating the Object[] in their backing array lists. This isn't always needed - e.g. when we're not using an ORDER BY clause, we shouldn't allocate the SortFieldLists's backing array.

If this is improved, we can further remove pressure from the GC. In high throughput benchmarks, improving this accounts for 2% - 3%, which isn't much, but still worth the non-intrusive, trivial change.

This is a finding from analyses made after a third-party benchmark comparing jOOQ with JDBC, Hibernate, Spring Data:
https://github.com/nithril/sandbox-query-benchmark-jooq-hibernate-jdbc

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions