Skip to content

Expensive calls to BigDecimal.equals #884

Description

@phdoerfler

Grackle seems to call BigDecimal.equals a lot. In my case, these take 50% of the thread's time which processes the query (490 of 1091 samples) (see highlighted region):
Image

One of, if not the main culprit, seems to be assert(leafFocus != FailedJoin) in SqlMapping.
Replacing the equals with eq and thus referential equality (which should be safe here since FailedJoin is a singleton) there and in a few other related areas gets rid of the costly BigDecimals.equals completely, avoiding the expensive stack trace creation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions