[ 
https://issues.apache.org/jira/browse/NETBEANS-2525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16837887#comment-16837887
 ] 

Eric Bresie edited comment on NETBEANS-2525 at 5/11/19 3:59 PM:
----------------------------------------------------------------

I'm wondering if this has to do with the underlying way things are read in and 
the File operations

I believe some of the older means of doing so with the File io apis may be a 
little slower with a possible "stream" or Path based api calls way of doing so 
with more recent java versions may be a possible path forward. 

As I understand the flow, with basic File logic like with File listFiles() type 
call [a search for listFIles finds over 100 cases of use which may be good 
candidate of similar slowdowns], it waits to complete for all files to be 
loaded into memory.  So maybe some form of stream based version to handle 
things as they are scanned in instead of waiting for all files to be scanned in 
might help.

 

This may be similar to NETBEANS-2409 (which is more Windows Specific) but it 
shows a pattern of slowness due to the underlying File calls which further make 
calls to lower level OS specific calls (WinNTFileSystem)

Some possible approached may be present in a few similar older tickets like

[https://netbeans.org/bugzilla/show_bug.cgi?id=65135#c38]

[https://netbeans.org/bugzilla/show_bug.cgi?id=267990]

[https://netbeans.org/bugzilla/show_bug.cgi?id=168389]

I think if I've read things correctly, some aspects of this was done by caching 
some of the attributes in FileObject or FileInfo classes which may still have 
some underlying operations (i.e. isDirectory calls to File.isDirectory which 
calls to expensive "WinNTFileSystem.getBooleanAttributes[native] type calls).  
Assume after some of the first time doing so maybe some of this gets captured 
in the cache but still has to do some of that up front,

For additional alternative file activities see 

[https://docs.oracle.com/javase/tutorial/essential/io/legacy.html]

[https://docs.oracle.com/javase/tutorial/essential/io/links.html]

[https://www.rgagnon.com/javadetails/java-get-directory-content-faster-with-many-files.html]

[https://stackoverflow.com/questions/31706058/get-large-directory-content-faster-java-io-file-alternatives]

 


was (Author: ebresie):
I'm wondering if this has to do with the underlying way things are read in and 
the File operations

I believe some of the older means of doing so with the File io apis may be a 
little slower with a possible "stream" or Path based api calls way of doing so 
with more recent java versions may be a possible path forward. 

As I understand the flow, with basic File logic like with File listFiles() type 
call, it waits to complete for all files to be loaded into memory.  So maybe 
some form of stream based version to handle things as they are scanned in 
instead of waiting for all files to be scanned in might help.

 

This may be similar to NETBEANS-2409 (which is more Windows Specific) but it 
shows a pattern of slowness due to the underlying File calls which further make 
calls to lower level OS specific calls (WinNTFileSystem)

Some possible approached may be present in a few similar older tickets like

[https://netbeans.org/bugzilla/show_bug.cgi?id=65135#c38]

[https://netbeans.org/bugzilla/show_bug.cgi?id=267990]

[https://netbeans.org/bugzilla/show_bug.cgi?id=168389]

I think if I've read things correctly, some aspects of this was done by caching 
some of the attributes in FileObject or FileInfo classes which may still have 
some underlying operations (i.e. isDirectory calls to File.isDirectory which 
calls to expensive "WinNTFileSystem.getBooleanAttributes[native] type calls).  
Assume after some of the first time doing so maybe some of this gets captured 
in the cache but still has to do some of that up front,

For additional alternative file activities see 

[https://docs.oracle.com/javase/tutorial/essential/io/legacy.html]

[https://docs.oracle.com/javase/tutorial/essential/io/links.html]

[https://www.rgagnon.com/javadetails/java-get-directory-content-faster-with-many-files.html]

[https://stackoverflow.com/questions/31706058/get-large-directory-content-faster-java-io-file-alternatives]

 

> Background Scanning Process for first NetBeans start took more than 15min
> -------------------------------------------------------------------------
>
>                 Key: NETBEANS-2525
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-2525
>             Project: NetBeans
>          Issue Type: Bug
>          Components: ide - Performance
>    Affects Versions: 11.0
>         Environment: Product Version: Apache NetBeans IDE 11.0 (Build 
> incubator-netbeans-release-404-on-20190319)
> Java: 11.0.2; Java HotSpot(TM) 64-Bit Server VM 11.0.2+9-LTS
> Runtime: Java(TM) SE Runtime Environment 11.0.2+9-LTS
> System: Windows 10 version 10.0 running on amd64; Cp1252; de_DE (nb)
> User directory: C:\Users\Chrl\AppData\Roaming\NetBeans\11.0
> Cache directory: C:\Users\Chrl\AppData\Local\NetBeans\Cache\11.0
>            Reporter: Christian Lenz
>            Priority: Critical
>              Labels: performance
>         Attachments: 11.0 - messages.log, 11.0 - uigestures
>
>
> Steps to reproduce:
> * Open NetBeans 11.0 for the very first time
> * Choose yes to import settings from NetBeans 10.0 (No plugins, just settings)
> * After NetBeans opens, It imported 33 projects from my old NetBeans instance.
> * Install nb-javac.
> * It opens the projects.
> * Background scanning comes ups, need couple of minutes
> * Because of some HTML5 projects, Oracle JS Parser implementation installer 
> comes up
> * Install Oracle JS Parser Implementation.
> * After first background scanning is finished the next one is coming up and 
> takes even longer.
> * Waiting until everything is finish. Round about 15-17 min.
> I added a heap dump, created via Visual VM (In case of sensitive data, I 
> removed the link, please give me a private link where I can upload it.
> No I don't want to not use importing settings. First it is possible and 
> needed and second because it is not a real world case. I want my settings 
> from my old IDE and all my opened projects. I don't want to import/open them 
> one after one again, this is not a use case. And I don't want to make the 
> settings again and again, switching to a new version. Of course it will not 
> running as long as I open NetBeans w/o importing settings and opening all 
> projects but again this doesn't make sense.
> My projects are:
> * 5 Maven
> * 1 PHP
> * 4 HTML5
> * 14 Ant based NetBeans modules (Some 3rd-party, some from the Core)
> * 8 Maven based NetBeans modules (all 3rd-party)
> * 1 NetBeans Module suite project
> What information do you need more? I will add the messages.log too, but I 
> need to clean up my user dir again, because I opened NetBeans after the 
> profiling again.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to