palantir / palantir/palantir-java-format

Performance regression during upgrade from 2.88.0->2.89.0

Open
#1,632 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
907
Forks
101
Avg merge
1d 3h
Merged PRs (30d)
19

Description

DeepNesting.txt

Attached file from project which contains a lot of similar files, made generic to keep original structure and work with plain java classes. Such files are formatted on 2.88.0 in non-noticeable time, in 2.89.0 (and with its performance enhancements) and later it takes 10+ seconds, as a test case for FormatterIntegrationTest it takes 39 secs on my machine. With performance enhancement reverted, it takes 350ms.

In original project such extreme code blocks are marked as not to be formatted, but seems to take long time regardless.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached DeepNesting.txt and FormatterIntegrationTest, comparing formatting times between versions 2.88.0 and 2.89.0. Review the performance enhancements in pull request 1535 and test the case with those changes reverted. Done means restoring the earlier performance for this input without breaking formatter behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
performance, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.