Right-click context menu slow to open on top level project directory

Issue #2577 open
Barney Laurance created an issue

I use the right-click menu on the top directory in my project frequently, particularly to get to “find in files”.

When I right click on that top directory “salesforce” I have to watch a spinner for 2 seconds or so while I wait for the menu to open. But if right-click a subdirectory instead the menu opens usually opens fast, but it depends which directory. force-app is fast, but .sfdx and node_modules are slow

I’m not 100% sure if this is actually an IC2 specific issue or if it could be an IntelliJ issue, but reporting here as I’ve only noticed it when working in my Salesforce repo.

Comments (4)

  1. Scott Wells repo owner
    • changed status to open

    Hi. Are you seeing this consistently or only the first time you right-click on the root node after opening a project. There are several checks required to determine which IC2-specific actions should/should not be enabled/visible, but the information required for those checks should be cached pretty aggressively after the first check.

    In one of my larger projects, I also see an ~2 second delay the first time, but on subsequent right-clicks, the context menu opens almost instantaneously. If you're not seeing the same, can you characterize the project in terms of volume of metadata, etc.?

  2. Barney Laurance reporter

    Thanks Scott. It is consistently, not just the first time after opening the project.

    Not sure how to characterize the volume of metadata, there are about 8k file total under force-app if that helps?

  3. Scott Wells repo owner

    Hi. Okay, and that helps. I’ll try to mock up a project with a similar volume of metadata and see if I can reproduce the behavior. I’ll keep you posted here.

  4. Scott Wells repo owner

    Hi, Barney. I’ve been trying to reproduce this with a few larger projects. I can definitely reproduce a slower initial context menu, but once opened once, it tends to open almost instantaneously after that, e.g.:

    Can you characterize the project(s) where you’re seeing it open slowly consistently? How many metadata files are in the project? Can you share the .iml file so I can see if there is any configuration that could be simplified, e.g., nested content/source roots that might be resulting in repeated status checks on the same files?

  5. Log in to comment