netbeans: PHP: Ctrl + hover - freezing Netbeans (go to declaration)
Apache NetBeans version
Apache NetBeans 19
What happened
I get methods header definition when I Ctrl + hover with mouse across a methods name in form of a tooltip.
Often, when I try doing it freezes the whole NetBeans and causes CPU use spikes up to 100% that can last for half a minute.
It is not functional in this form. Please, let me know how can I disable this feature until it is fixed.
How to reproduce
I have a large PHP project where I use a lot of third party packages, I guess it means that the project should be big. The freezing is not happening every time, but it happens very often. The important part is that you need to move mouse when pressed ctrl, if you first position a mouse and then just press ctrl - it will do “go to declaration”. It is different and it is working fine.
Did this work correctly in an earlier version?
I have the same negative experience with all of the known versions of NetBeans as far as I can remember, 17/18/19…
Operating System
Windows 10 version 10.0 running on amd64; UTF-8; en_AU (nb)
JDK
19.0.1; Java HotSpot™ 64-Bit Server VM 19.0.1+10-21
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
I have a pretty good computer I7 with 32 GB of RAM. I don’t believe scanning source texts would make this computer freeze even for one second unless there is a bug somewhere.
Please, let me know how can I disable this feature until it is fixed. Thank you
Are you willing to submit a pull request?
No
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Reactions: 1
- Comments: 23 (10 by maintainers)
I’m working on this. Maybe, I can improve this. @terax6669 's project was so helpful. Thank you!
Exactly the same as I described. I even sent junichi a similar video where the go to declaration fails for 2 minutes lol
Yep, it has been an issue pretty much ever since I can remember (8.2 or 9), same with ctrl+space and ctrl+click. The infinite “background scanning” is gone, but the issue is not.
Excluding as many files from the project as you can as well as increasing the default cache/heap sizes used to help, but that’s obviously only hiding the underlying issue… and nowadays I can’t really tell the difference between increased cache size or not. Perhaps my current main project’s size is just too large for it to make a difference anymore.
Personally I’ve gotten somewhat used to finding the class I need in the tab bar and using ctrl+f rather than ctrl+click, it’s infinitely faster. And thanks to windows’ win+v clipboard history I don’t have to worry about copying the method name that I want to find 😅…
The sad fact is - if you want to work on big projects you gotta switch to PHP Storm. There have been bug reports, stack overflow threads, wiki articles (now available only on web archive due to the apache overtake) and no fix for 10 years.
I’m going to merge #6712 tomorrow. Then, I will
Thanks!
-> https://github.com/apache/netbeans/discussions/6581
I’ve fixed in #6712 Could someone test it? ~~zip dev version is available: https://github.com/apache/netbeans/suites/18271218545/artifacts/1056392947~~ deleted
The root cause here is maybe similar to the https://github.com/apache/netbeans/issues/3933 ( @mbien ) But it may be different because 〈Go to Declaration〉 is a part of the mouse-right-click drop down menu, and it is also can be called with 〈Ctrl+B〉. Neither of these ever frozen my system. Only 〈Ctrl + hover〉 causing the freezing. The〈ctrl + mouse click〉is difficult to separate from 〈Ctrl + hover〉 but I’m convinced that 〈ctrl+mouse click〉 is not causing it either.
I believe that the methods header definition in a form of a tooltip is a cause for freezing.
And I understand that it may be not even a bug, but a slowness. I try do avoid the word “bug” to not being judgmental. I call it an “overlook”. So I believe there is a big overlook in the system that methods header definition tooltip cannot be disabled in the configuration. Thus, I team up with @terax6669 in understanding that big projects can require a different treatment and developers should have a way to configure the IDE for it. There are many ways to get to the method declaration. But it is extremely unpleasant to have a feature in the IDE that can cause freezing but cannot be disabled. It is unpleasant to move a mouse away from the code field every time when you try to press 〈Ctrl+E〉 or 〈Ctrl+X〉 or something similar that can cause the movement of the code under the steady mouse, because it can be treated as a 〈Ctrl + hover〉.
It is an UX problem.
I use blade and Windows ( @haidubogdan ), but I cannot uninstall it.
is this a duplicate of #3933?
its no downgrade. JDK 19 is end of life.
JDK 21 is released. However, it was released after NetBeans 19 so we couldn’t support it at that time.
You can run NB 19 on the latest upgrade releases of following still supported JDKs: 11, 17, 20 as mentioned on the download page.
11 and 17 are long term support releases. NetBeans 20 will also support JDK 21 which is the next long term support release.
JDK 19 was a short term release and is end of life. You could try JDK 11 or 17 which are both long term support releases (NetBeans 20 will also support JDK 21 with is the latest LTS release). If you don’t want to update the JDK all the time, NB is also available as bundle containing the latest supported JDK on the download page.
This might not help your issue, but at least the runtime is up to date 😃