You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Laszlo Kishalmi (Jira)" <ji...@apache.org> on 2021/04/21 16:51:00 UTC

[jira] [Commented] (NETBEANS-5610) Gradle project loaded several times during project open

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

Laszlo Kishalmi commented on NETBEANS-5610:
-------------------------------------------

NetBeans works in a way, that whenever it encounters a folder it checks whether it is a project or not.

If the folder identified as a project NetBeans creates a Project object from that. It is still not opened, but can be queried usually for some basic info.

For Ant and Maven projects it's merely parsing an XML, so not that resource intensive. With Gradle, I've invented FALLBACK to use some heuristics, so we do not have to turn to Gradle in those cases.

When a project is being opened we raise the quality of information requirement on the project and if needed load the information from the Disk Cache or Gradle itself.

> Gradle project loaded several times during project open
> -------------------------------------------------------
>
>                 Key: NETBEANS-5610
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-5610
>             Project: NetBeans
>          Issue Type: Bug
>          Components: lsp, projects - Gradle
>            Reporter: Svatopluk Dedic
>            Assignee: Svatopluk Dedic
>            Priority: Major
>              Labels: performance, race-condition
>         Attachments: gradleproject.log
>
>
> To reproduce: get a LSP client, e.g. VSCode. get *micronaut-test* project, which is multi-project. In the LSP client, open a source from *test-junit5*.
> I noticed that Gradle projects are loaded several times during LSP "project open" operation. The project first aims for FALLBACK and only then for FULL_ONLINE; maybe an issue with the 'priming' action.
> But immediately after that the project again loads FALLBACK (from a RP, presumably a scheduled task from project open ?) and the *again* aiming FULL (from the projectOpened hook).
> Finally the *parent* (root) project is opened - surprising at level FALLBACK - from *WorkspaceServiceImpl.getTestRootURLs*. Not sure if this quality level is sufficient for further operation: [~lkishalmi]  – what are the implications of getting the container project just to FALLBACK quality ?
> // cc: [~dbalek]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

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