Very slow work of "Mercurial > Show Annotations" functionality
Apache NetBeans version
Apache NetBeans 14
What happened
I have project that uses Mercurial (hg) as revision control system.
If I'm trying to use Show Annotations functionality this causes extremely high usage of memory and extra loading to the processor. The action usually takes 3 and more minutes. At the same time if I use original Mercurial command (hg annotate -n -u some-file.php) for this I just get result immediately.
This is CPU, memory levels and time before clicking the menu:

Then I click the menu and CPU and memory levels starting to grow:

Finally it uses whole available memory, CPU level is high:

Then memory usage goes down, but CPU level is still high:

Then finally after 5 minutes the CPU level goes down and I can see annotations:

How to reproduce
- you need to have hg repository. I have more than 10k files and more than 10k commits.
- create project from this repository and open it
- open some file
- right click on the tab > Mercurial > Show Annotations
Did this work correctly in an earlier version?
Apache NetBeans 12.3 or earlier
Operating System
Windows 10 Home, 21H2, x64
JDK
jdk-16.0.2
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
The problem occurs every time when I try to get annotations. If I committed some changes to the repo, or pulled and updated and I had some file opened with annotations - the NetBeans starts to "recalculate" those annotations for all those files.
This functionality worked perfectly on NetBeans 8.0.2. Then I changed computer and installed NetBeans 12.4 and it never worked anymore.
For NetBeans 12.4: -Once I noticed this error message in the logs, but I'm not 100% sure that this is related: WARNING [org.netbeans.modules.mercurial]: AnnotateAction: toAnnotateLines(): Failed when matching: *** failed to import extension paper: No module named paper -Also sometimes (very seldom case) if memory of my computer is full and I'm trying to get annotations NetBeans starts to eat memory, but then some overflow happens, I see some error message and annotations on the place. This takes twice less time to get annotations in this case that usual.
Are you willing to submit a pull request?
No
Code of Conduct
Yes