This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Something has to be done about how slow the code completion is. (in my case for PHP projects) Even for objects that it retrieved methods for, it still takes sometime (not always but sometimes). I am getting at least 10 to 20 seconds of wait time. I initially thought it was my machine that was at fault, but now I am on a brand new machine. Here are the details: CPU: Intel Core i7 4790K RAM: DDR3 16GB Storage: SM951 M2 ACHI OS: Windows 10 pro 64bit This must be something in the code. Whatever algorithm is used to manage code completion. The project I am working on doesn't have that many files, so I don't see why the code completion takes so long. Please, someone do something about this. I really enjoy netbeans but this issue with the code complete really kills my flow when programming. If required I will post a video of how slow this is.
Can you please capture data from profiler and attach it here. You can use Profile the IDE action (by default Alt-Shift-Y). Just press the shortcut, perform the long code completion and press the shortcut again. The save the snapshot and attach is here. We'll evaluate what is taking so long. Thanks
Ok I got a snapshot but how do I view it? I am trying to see what data I am posting on a public site so I really want to see what this snapshot contains. Any clues as where I can see this?
Created attachment 157662 [details] Failed dependency
I have installed the java plugins so that I can view the profiler output (thanks for explaining that), but now I get an error about a failed dependency. I have attached a screenshot. Please advise!
Created attachment 157701 [details] super slow
I have added another screenshot just to show how slow the auto complete is. I had just created that variable and on the next line when I was intending on using it, I started typing and then did ctrl+space, assuming netbeans would quickly autocomplete it, but it didn't, it gave me that little "Please wait..." text. I really don't understand, I just created the variable and I am in the scope. I would assume that, however netbeans scans for variables, it would start in the scope its in. I have also created a bug report on the failed dependency.
Here is a link to a video that shows netbeans getting confused. https://www.youtube.com/watch?v=mzLZX3E1BHs As I state in the description, I have seen this confusion when trying to auto complete php array functions, I type 'array_' and then it takes 15s or more for netbeans to provide the auto complete list.
Created attachment 157809 [details] Profiler output
I have attached the profiler output. I was trying to auto complete a method in a class and it took forever. I hope that with this profiler output you can gain a better understanding of the problem and possibly fix this. I can't stress how disruptive this is for a programmer. You expect this to be a quick operation and it takes forever for netbeans to show the list even when auto completing methods from the class I am in.
Does it happen to you in all your PHP files? In all your PHP projects? Will it help if your try a clean/new userdir [1]? Or more precisely, if you clean your cache dir [2]? Of course, it would help us if we could have a reproducible use case - is there any chance to get your project? Or is it possible to get a sample project with this problem? Last but not least - always please attach your IDE log [3], it can contain some important information. Thanks. [1] http://wiki.netbeans.org/FaqAlternateUserdir [2] http://wiki.netbeans.org/FaqWhatIsUserdir [3] http://wiki.netbeans.org/FaqLogMessagesFile
I don't think this is due to a cachedir issue just because I had these issues with a brand new laptop. I cannot post any code as the code does not belong to me. The projects I am using all use Symfony2, so maybe start with that. I don't think you need a big project to test this. I think netbeans just "gets" confused sometimes, even with properties from the very class its in.
Just for clarification - I asked for reproducible use case since IMO we do not have any other issues similar to this one. And without reproducible use case it is generally difficult to fix anything :/ Anyway, we will investigate the profiler snapshot you have attached and hopefully will find some problem there. Thanks.
You don't? Check out this quick google search https://www.google.com/search?q=netbeans+autocomple+slow&ie=utf-8&oe=utf-8
Only reports in this Bugzilla count; we cannot google and try to get feedback from random users from Internet, sorry.
Sure, I understand that, but please don't make it sound like I am the only one complaining about this issue. I might be the only one trying to do something about this by reporting a bug but I am far from being alone.
(In reply to antoniocs from comment #15) > please don't make it sound like I am the only > one complaining about this issue. I have to repeat myself - this is currently the only report we have in PHP area (if I am not wrong, of course) and therefore I asked you for reproducible use case (reason already explained). > I might be the only one trying to do > something about this by reporting a bug but I am far from being alone. And this is really great and appreciated, of course! Thanks.
(In reply to antoniocs from comment #7) > Here is a link to a video that shows netbeans getting confused. > > https://www.youtube.com/watch?v=mzLZX3E1BHs Just noticed that you have incorrectly defined the vardoc comment: /* @var StepInterface */ But it should be: /* @var $step StepInterface */ (type "vdoc" above $step declaration, press TAB and NetBeans will create the vardoc comment for you). We tried to reproduce your issue using the incorrectly defined vardoc comment but no issue found, code completion is fast (in our testing PHP project).
Forgot about the name but the thing is Netbeans would autocomplete sometimes fast sometimes super slow.
(In reply to antoniocs from comment #8) > Created attachment 157809 [details] > Profiler output So, in this snapshot, there is unfortunately nothing suspicious - the whole snapshot is taken for 18 seconds, PHP support takes 2 x 5 seconds. Not sure how exactly you have it created so those 2 PHP activities could mean 1 or 2 invocations of code completion. So, we need a better snapshot. Here are the exact steps, based on the Youtube video you have created: - have the exact code as in the video - the code where you are going to complete local variable name - invoke code completion - the first one is fast, at least this is what can be seen in the video - start profiling - invoke code completion - now, it should take really long time, again, based on the video - wait till the code completion appears, do NOT type any characters! - stop profiling - reopen this issue - attach the profiler here. In other words, we need snapshot of exactly ONE long invocation of code completion. Thanks for your cooperation!
Most of the php projects I work are closed source so I can't give you the source code. I will try to create a mock project and test it that way.
(In reply to antoniocs from comment #20) > Most of the php projects I work are closed source so I can't give you the > source code. I will try to create a mock project and test it that way. I understand that. Please, first try the steps from my previous comment (comment #19), it could help us. Thanks.