tests in module java.refactoring are excessively slow
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### Description
# The first test in each test class takes 18.000 milliseconds on average.
With 31 test classes in the `org.netbeans.modules.refactoring.java.test` package alone, that is a huge waiting bill, or stated otherwise it takes my caffeine level over healthy values.
Since some of these tests involve the GUI, working on other things on the same machine is unproductive, because your work will lose focus.
### Use case/motivation
Run the tests in package `refactoring/netbeans/org.netbeans.modules.refactoring.java.test` and measure.
NetBeans will do that for you. The last run on my machine (AMD64, 24 virtual cores, that do not help,32 Gigs of memory for me and netbeans alone).

I would replace the method `writeFilesAndWaitForScan` with one that skips the *wait for scan* part. The wait for scan part is
documented as use with care, it takes a long time. From experience some, maybe a lot more can do without the full scan.
I will be waiting for approval before starting this effort.
### Related issues
developing/adding features/resolve bugs. #7043, #7044
### Are you willing to submit a pull request?
Yes
Contributor guide
Research direction
Run the tests in refactoring/netbeans/org.netbeans.modules.refactoring.java.test and measure the current delay, then inspect the writeFilesAndWaitForScan method and its uses. Done means the applicable tests no longer incur unnecessary scan waits while continuing to pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- performance, testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100