Skip to content

Performance issue in TastyUtil::hasTastyFile when using Java classes #576

Closed
@wix-andriusb

Description

@wix-andriusb

Hey, after I upgraded to a newer jackson version, I saw a lot of weird timeouts in our unit tests which should finish immediately.

After inspection I found this
tasty_trace

It seems like it checks if the class has a tasty file by operating on the the jar files which is a very costly operation if we assume that this is a cpu bound operation.

https://github.com/FasterXML/jackson-module-scala/blob/2.14/src/main/scala/com/fasterxml/jackson/module/scala/util/Classes.scala#L10-L12

It seems like this code path will always hit for classes defined in java(not scala classes), because the first two checks will always be false.

The tests succeeds if I add a retry, so I assume the result of this operation is cached?
Maybe it is possible to do val extendsScalaClass ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.143.xSomething that likely has to be done in 3.x, not 2.x

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions