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.
This is a comment from issue #189889: Apparently, there are different bottlenecks that cause this performance problem. But I think one of them makes the most noticeable slowdown. Here is how you can reproduce a situation where this bottleneck shows itself: 1. Put Zend Framework library in your project's include_path config in netbeans. 2. Your project will be a simple php file that tries to instantiate a ZF class like Zend_Db_Table_Row_Abstract. 3. Start typing: $row = new Zend_Db_Table_Row(); >> as you may have noticed, it's only one line of code, and none of the framework files are changed, cause they are just in the include path, but yet, the code completion is really slow and we are still better off typing the class name manually. What this tells us, is that even if the problems like duplicate sources and models taking too long to be built didn't exist, the code completion would still be really slow. Can anyone tell us what happens (overally) when the developer types in $var = new Zend_ and then hits space? I mean, suppose all the files in the project are fully parsed and all the models are built, and we are just typing in an empty file; what functions are called when netbeans tries to give the user a list of suggestions for the auto complete?
This is good usecase. Thanks cgalive. So what happens? Basically when you write new Zend_ , then the ide looks for all constructors that can starts with Zend_ . The counting constructors is slow, because the constructor doesn't have to be declared in the class, but in an extend class, which doesn't have to starts with Zend_ . So basically the algorithm is in pseudo language: 1. give me all classes that starts with Zend_ 2. for every founded class 3. If has a constructor continue 4. If doesn't have a constructor, try to find recursively constructor in extended class until a constructor will not be find Because there is many classes that starts with Zend_ the algorithm is slow. So I think the fix for this case, can be that the code completion will suggest in this case just name of classes and when a user choose a class, then the constructor is counted just for the selected class. The disadvantage of this is that you will not see parameters of constructor. Do you agree with this solution
Fixed in web main.
Integrated into 'main-golden', will be available in build *201012090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/43e6b7b78866 User: Petr Pisl <ppisl@netbeans.org> Log: #193040 - Slow code completion when complete constructor
*** Bug 192775 has been marked as a duplicate of this bug. ***
*** Bug 197267 has been marked as a duplicate of this bug. ***