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.

Bug 200054 - creating new files is very slow
Summary: creating new files is very slow
Status: RESOLVED INCOMPLETE
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.1
Hardware: PC Linux
: P3 normal with 4 votes (vote)
Assignee: Ondrej Brejla
URL:
Keywords: PERFORMANCE
: 207607 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-07-11 15:16 UTC by DevMonk
Modified: 2014-02-19 14:43 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Profiler result from a slow "Create PHP File" operation (1.05 MB, application/octet-stream)
2012-01-10 17:25 UTC, jaitsu
Details
Messages Log (1000.15 KB, text/x-log)
2012-01-11 16:25 UTC, jaitsu
Details
Symfony 1.4 sandbox set up to create a medium-complexity dummy model hierarchy (5.51 MB, application/x-tar)
2012-01-31 14:17 UTC, scifi_fan
Details
IDE profiling, tried to create several files during it (248.47 KB, application/octet-stream)
2012-06-26 12:00 UTC, PunchyRascal
Details
Profiler result from a very slow "Create new file" operation (1.50 MB, application/octet-stream)
2014-02-19 14:06 UTC, guaycuru
Details

Note You need to log in before you can comment on or make changes to this bug.
Description DevMonk 2011-07-11 15:16:51 UTC
Copying a file is fast, but creating a new one seems to be very slow in Netbeans 7 under ubuntu. Drives my dual core CPU to 100% and can't finish the task in 5 minutes. It doesn't matter if it's a simple text file, css, js, php, whatever. I used to have this problem with Kubuntu 10.04 (32bit), but it is also present under Ubuntu 11.04 (64bit).

This problem was introduced with 7.0. (6.5 to 6.9 did not have this problem.)

The new file is created if I hit cancel.
Comment 1 Tomas Hurka 2011-07-15 07:50:01 UTC
I am not able to reproduce it. Please use 'Profile Me Now' http://wiki.netbeans.org/FitnessViaPartnership to provide more information, so we can diagnose the problem. Thanks.
Comment 2 PolarZoe 2011-09-09 09:48:19 UTC
I'm having the same problem with Netbeans 7.0.1 on Windows 7
Comment 3 jaitsu 2012-01-10 17:13:51 UTC
This is still an issue in 7.1 release on Ubuntu (11.10).

I'll attach a profile report of the issue
Comment 4 jaitsu 2012-01-10 17:25:15 UTC
Created attachment 114771 [details]
Profiler result from a slow "Create PHP File" operation

This was ran on Netbeans 7.1 build 201112071828

Had around 5 files open for editing... right clicked on a folder in the Project tree and clicked 'New > PHP File'. Took around 15 mins to complete.

It's also worth mentioning that after about 5 mins of waiting I decided to check the file system and see if it had managed to create the file, and the file had been created okay. It was another 10 mins of waiting before I could use Netbeans again, it seems to just lockup doing nothing.
Comment 5 Petr Cyhelsky 2012-01-11 09:38:32 UTC
From the snapshot it seems that the file is created and is being opened in editor, but before showing it in the editor indenting has to be computed - and this is waiting for scanning and indexing to be finished.

Can you please provide some more information as to why did the scanning and indexing take so much time:
How many projects do you have opened? How big they are (especially the one in which you are creating the file)? What is your projects root? Was the scanning... progress bar present when you tried to create the file?
It would also be helpful if you attach the messages.log file.
Comment 6 jaitsu 2012-01-11 16:25:54 UTC
Created attachment 114804 [details]
Messages Log

I have attached my latest messages.log file (let me know if it doesn't contain anything useful and I can get a fresh example).

I currently have two symfony projects open, one has 6000 files and another has about 4500.

The progress bar wasn't showing that it was scanning when I attempted to create the new file.
Comment 7 jaitsu 2012-01-11 16:26:23 UTC
Also,  I was creating the file in the project that has 6000 files
Comment 8 Ondrej Brejla 2012-01-13 09:56:12 UTC
Is it possible, that you have in your project such a file, which is really really big? E.g. with a lot of assignments? I've fixed bug which freezed creeating of new php file for 28 mins...and it was caused by one 40k lines file with 40k assignments... issue #206521

Please, can you test it in the latest development version, where the fix is applied? Thanks a lot.
Comment 9 jaitsu 2012-01-13 11:38:40 UTC
I don't have a file that size, or anywhere near that size for that matter. It's possible that it could be a large file in the Doctrine ORM library causing the issue.

How can I obtain the latest development build of netbeans to test with?
Comment 10 Ondrej Brejla 2012-01-13 12:32:21 UTC
You can download it from here: http://bits.netbeans.org/download/trunk/nightly/latest/
Comment 11 jaitsu 2012-01-13 13:05:40 UTC
I downloaded the nightly build, it took forever indexing the project and never finished (after 15 mins). I tried to create a new PHP File anyway (scanning projects task was stuck on  100%).

The create file task hung for about 10 mins like it did in the latest stable build, but then netbeans eventually just closed itself. Can't get you a profile result though because it quit out.
Comment 12 Ondrej Brejla 2012-01-13 13:09:16 UTC
Can you provide that project, which is scanned? I think that there will be some uncommon constructs which are processed for a long time...
Comment 13 jaitsu 2012-01-13 15:09:35 UTC
Unfortunately not, its a client project and I can't disclose the contents of it.

Some more information on the project though:

- it's using Symfony framework version 1.4.15
- it has the doctrine and propel libraries included also
- there are over 6000 files with about 70% of these being classes (most of them include doc comments too)

Let me know if there's anything else I can provide
Comment 14 jaitsu 2012-01-13 16:22:43 UTC
Another point, it hangs the same way when creating JavaScript files too
Comment 15 Petr Cyhelsky 2012-01-23 06:06:28 UTC
*** Bug 207607 has been marked as a duplicate of this bug. ***
Comment 16 stephenliberty 2012-01-23 06:59:59 UTC
My bug got duplicated over to here, an example project that causes my IDE lock is kohana + propel + extjs.
Comment 17 scifi_fan 2012-01-31 14:17:06 UTC
Created attachment 115412 [details]
Symfony 1.4 sandbox set up to create a medium-complexity dummy model hierarchy

I found this happening when something causes the IDE to scan the entire project, which takes, under certain circumstances, quite long. For example, if I run a test suite that creates and deletes fixture files quite often, I can not use code navigation and file creation any more.

I have created a scenario package (from symfony 1.4 sandbox) that can be used to reproduce this on my Ubuntu 11.04 box with PHP 5.3.5 and netbeans installed with netbeans-trunk-nightly-201201260600-ml-php-linux.sh from "Development Downloads" page. It is essentially a stripped down Symfony 1.4 Sandbox which is set up to create 50 model hierarchies with 5 levels of model inheritance each (can be adjusted in config/doctrine/schema.yml).

Reproduction procedure:

- Extract attached symfony project to arbitrary folder
- Open Netbeans
- Create PHP project from existing sources, with project root in extraction folder
- Wait for "Scanning projects" to finish (~10 seconds)
- Execute on command line in project root: php symfony doctrine:build --all --no-confirmation
- Wait for the command to finish (~3 seconds)
- Go to netbeans
- Create new PHP file in "web" folder named "test.php" (~1 second, so no bug yet)
- Again, execute on command line in project root: php symfony doctrine:build --all --no-confirmation
- Go to netbeans
- Create new PHP file in "web" folder named "test2.php"

Expected result: 
- File should, again, be created within about a second

Actual result:
- File is created on filesystem, but creation dialog blocks interaction with netbeans (on my machine, for 6 minutes)


This might be related to the "redundant file scan triggering" mentioned in http://netbeans.org/bugzilla/show_bug.cgi?id=206443#c12
Comment 18 Tomas Zezula 2012-02-06 14:57:35 UTC
Fixed jet-main 41985eb45913
Comment 19 Codepeak 2012-03-12 13:13:55 UTC
Bug still exists in nightly build 201203110400.
Comment 20 Ondrej Brejla 2012-03-19 08:33:40 UTC
Provide us some more info...thread dumps, snapshots, etc. "still exists" is not much descriptive. Thanks.
Comment 21 scifi_fan 2012-03-19 09:56:57 UTC
I confirm that the bug mentioned by me previously in Comment 17 seems fixed in nightly 201203180400 installed on my Ubuntu 11.04 system.
Comment 22 PunchyRascal 2012-06-26 12:00:03 UTC
Created attachment 121360 [details]
IDE profiling, tried to create several files during it

I experience this too. Attaching profile
Comment 23 Ondrej Brejla 2012-06-26 12:12:20 UTC
There is no php class in whole snapshot. Problem will be somewhere else (maybe in some socket connection).
Comment 24 PunchyRascal 2012-07-09 09:15:30 UTC
I downloaded the current 7.2 RC 1 and the problem seems to be fixed, creating files as well as code completion are both super fast! Thanks ;)
Comment 25 guaycuru 2014-02-19 13:28:10 UTC
This is happening to me on Netbeans 7.4 occasionally.
I'll attach a profiler log.
Comment 26 Ondrej Brejla 2014-02-19 13:37:54 UTC
File new issue, this is very old. Thanks.
Comment 27 guaycuru 2014-02-19 14:06:55 UTC
Created attachment 145399 [details]
Profiler result from a very slow "Create new file" operation
Comment 28 Ondrej Brejla 2014-02-19 14:43:58 UTC
guaycuru: there is just JS Structure scanner in the snapshot (no PHP module class), so you can file a new issue to javascript/Editor and there attach this snapshot.