palantir / palantir/palantir-java-format
Performance regression during upgrade from 2.88.0->2.89.0
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 907
- Forks
- 101
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 19
Description
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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