I have played again with performance of the NetBeans PHP IDE. For this purpose I have created "PHP code generator" that generates php files with classes, which create large class structure. Still it's somehow artificial, but for testing purposes the generated sources are good and valid.
I did some measurements on Core 2 Duo 2 GHZ machine. I generated php files for four projects as you can see from the result table. I have switch off the Task list window and measured the time of the creating project with the initial indexing of the php files in the project. The initial indexing parses all files in the project and store information about the files in a cache. Basically the features like code completion, navigation etc. don't work directly with the files, but with the information from the cache. The time of the initial indexing is in the second column in result table. It can be increased when you allow to NetBeans to use more memory than is the default value. In such case the garbage collector doesn't have to run so often. For example when I have increased the memory for NetBeans to 512MB then the indexing of the project with 15 000 files was about one minute shorter.
| Number of PHP files || Initial project indexing ||Opening indexed project ||Responsiveness|
|2 500|| 34 s || 2 s ||OK|
|5 000|| 75 s || 3 s ||OK|
|10 000|| 258 s || 4 s ||sluggish|
| 15 000 || 395 s || 5 s ||slow |
The third column contains times that the IDE needs for opening a project. Because the cache is stored on HDD, the IDE check during opening project, whether the files were not changed externally to keep informations in the cache up-to-date. As you can see the times are very small.
The last column contains my feeling, when I tried to add a method into a class and navigate through the sources. Working with project with 5 000 files was OK and the slowdown of responsiveness wasn't significant. When I work with the project with 10 000 files, then the IDE was slow sometimes during opening files and I had to wait a while (1 - 3 seconds) for code completion in the top level context. Working with this project wasn't so comfortable like with the project with 5 000 files. Similar situation was, when I try to work with the project that has 15 000 php files. The hyperlink functionality still works great, but using code completion in the top level context needs some patience.
I was evaluating why the IDE is slower with big projects and I think that there is chance for improvements. If you work with such big project, I recommend to switch off the Task window, which can slow the parsing and opening projects.
I have one question for you. How many php files do you have in your projects? I would like to know, how big are the real projects.