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 205995 - Slow Upload Selection window and OutOfMemory error while trying to upload
Summary: Slow Upload Selection window and OutOfMemory error while trying to upload
Status: RESOLVED INCOMPLETE
Alias: None
Product: php
Classification: Unclassified
Component: FTP Support (show other bugs)
Version: 7.1
Hardware: PC Windows XP
: P1 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-06 13:38 UTC by Matt73
Modified: 2012-03-21 17:13 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
java.lang.OutOfMemoryError (27.89 KB, image/jpeg)
2011-12-06 13:38 UTC, Matt73
Details
Messages.log (67.23 KB, application/octet-stream)
2011-12-06 13:44 UTC, Matt73
Details
uigestures (226.11 KB, application/octet-stream)
2011-12-06 13:54 UTC, Matt73
Details
Profile Snapshot (41.71 KB, application/octet-stream)
2011-12-06 16:45 UTC, Matt73
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt73 2011-12-06 13:38:08 UTC
Created attachment 113871 [details]
java.lang.OutOfMemoryError

When trying to upload my project (via SFTP) it takes 35 seconds to show the File Upload window. In there are 1200 files and when trying to expand the treeview, each click again requires 35 seconds. Also enabling or disabling a tree takes this long.

This has been like this since 7.0, in 6.9 everything was still working fast.

But new in 7.1 rc1 and rc2 (and a real show stopper) is that after being this patient and then trying to upload anyway, I will get a java.lang.OutOfMemoryError after 62% of the file upload has been processed.

When trying to upload seperate smaller directories, it is still as slow, only no OutOfMemoryError

This is not just individual, my colleages have the same issue.
Comment 1 Matt73 2011-12-06 13:44:38 UTC
Created attachment 113872 [details]
Messages.log
Comment 2 Matt73 2011-12-06 13:54:26 UTC
Created attachment 113873 [details]
uigestures
Comment 3 Tomas Mysik 2011-12-06 15:49:12 UTC
Please, reopen this issue and provide a heap dump when the OOM error occurs - detailed information can be found here [1].

Thanks.
[1] http://wiki.netbeans.org/FaqNetBeansAndOOME
Comment 4 Tomas Mysik 2011-12-06 16:26:54 UTC
Couple of questions - so, your project has 1200 files - is it correct? And where do you have your project files? On a local hard drive? If there is anything special about your project, it would help us to know about it.
BTW maybe it could help also to take a profiler snapshot [1] just for the Upload dialog displaying (start profiling, wait for the Upload dialog to appear, Cancel, stop profiling).

Thanks.
[1] http://wiki.netbeans.org/FaqProfileMeNow
Comment 5 Matt73 2011-12-06 16:39:06 UTC
Will attach a memory dump and a profile snapshot asap.

The files are on a Network drive SBS 2008, under SVN control 1.6 and are uploaded to a linux server, CentOS 5.6

Further just lots of small PHP files
Comment 6 Matt73 2011-12-06 16:45:49 UTC
Created attachment 113886 [details]
Profile Snapshot
Comment 7 Tomas Mysik 2011-12-07 09:36:52 UTC
(In reply to comment #5)
> Will attach a memory dump and a profile snapshot asap.

Will have a look at it once they are attached. The heap dump is the only way to find out what consumes memory. One note - VisualVM [1] could be very helpful for creating heap dump.

> The files are on a Network drive SBS 2008, under SVN control 1.6 and are
> uploaded to a linux server, CentOS 5.6

Hmm, this is the reason why it is so slow. Network drives simply can't be as fast as local drives - I will verify in the snapshot you have attached. For testing, we use MediaWiki (cca 1900 files) and the upload dialog is nearly instant.

> Further just lots of small PHP files

Please, could you try the FCS build of NB 7.1 [2]? In any case, I will try to solve this issue ASAP.

Thanks.
[1] http://visualvm.java.net/
[2] http://bits.netbeans.org/7.1/nykwml/fcs/2011-12-05_11-21-34/
Comment 8 Tomas Mysik 2011-12-07 09:41:09 UTC
(In reply to comment #7)
> Hmm, this is the reason why it is so slow. Network drives simply can't be as
> fast as local drives - I will verify in the snapshot you have attached. For
> testing, we use MediaWiki (cca 1900 files) and the upload dialog is nearly
> instant.

From the snapshot, the FS is the culprit:

java.io.WinNTFileSystem.getBooleanAttributes[native]() 36197 ms

Unfortunately, this cannot be fixed in NetBeans, sorry.
Comment 9 Matt73 2011-12-07 10:14:26 UTC
(In reply to comment #8)
> From the snapshot, the FS is the culprit:
> 
> java.io.WinNTFileSystem.getBooleanAttributes[native]() 36197 ms
> 
> Unfortunately, this cannot be fixed in NetBeans, sorry.

That is strange, cause 6.9 didn't have this problem. It started with 7.0.
Comment 10 Tomas Mysik 2011-12-07 10:39:33 UTC
(In reply to comment #9)
> That is strange, cause 6.9 didn't have this problem. It started with 7.0.

The big change in NB 7.0 related to FS are native FS listeners. You can try 2 things:
(1) disable auto-scanning of sources [1]
(2) disable native listeners [2]

Of course, then it can easily happen that some external FS change will not be recognized by NetBeans.

Please, let us know if any of these helps.

Thanks.
[1] Tools > Options > Miscellaneous > Files
[2] start NB from commandline with:
-J-Dorg.netbeans.modules.masterfs.watcher.disable=true