Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDE File explorer is very slow #424

Open
kfirba opened this issue Oct 25, 2023 · 28 comments
Open

IDE File explorer is very slow #424

kfirba opened this issue Oct 25, 2023 · 28 comments
Labels

Comments

@kfirba
Copy link

kfirba commented Oct 25, 2023

Describe the bug

While the icons looks great, the IDE becomes very slow while using this plugin. The file explorer takes ages to "lock" on a file when the Select Opened File action is triggered. Also, when creating new folders/files, it takes a very long time before we see it refreshed in the file explorer.

To Reproduce

  1. Enable the plugin - The larger the project, the slower it gets
  2. Try to "scope" a file (CMD + F1) or to create a new file

Expected Behavior

File explorer updates should be snappy.

Environment

PhpStorm 2023.2.3
Build #PS-232.10072.32, built on October 13, 2023
Runtime version: 17.0.8.1+7-b1000.32 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.0
GC: G1 Young Generation, G1 Old Generation
Memory: 16000M
Cores: 10
Metal Rendering is ON
Registry:
    editor.focus.mode.color.light=415967
    ide.editor.tab.selection.animation=true
    debugger.new.tool.window.layout=true
    ide.animate.toolwindows=true
    run.processes.with.pty=TRUE
    ide.new.editor.tabs.vertical.borders=true
    ide.experimental.ui=true
    ide.balloon.shadow.size=0
    editor.focus.mode.color.dark=415967
    typescript.service.node.arguments=--max_old_space_size=12000

Non-Bundled Plugins:
    org.intellij.plugins.hcl (232.8660.88)
    com.github.copilot (1.3.2.3479)
    org.jetbrains.plugins.go-template (232.9921.89)
    com.github.camork.fileExpander (2.3)
    com.intellij.kubernetes (232.10072.33)
    ru.adelf.idea.dotenv (2023.2)
    com.chrisrm.idea.MaterialThemeUI (8.12.6)
    com.intellij.lang.jsgraphql (4.0.2)
    zielu.gittoolbox (500.0.21+222)
    mobi.hsz.idea.gitignore (4.5.2)

Plugin version is 93.1.0

Screenshots

@welcome
Copy link

welcome bot commented Oct 25, 2023

Thanks for opening your first issue here! Be sure to follow the issue template!

@mallowigi
Copy link
Collaborator

Performance is not something I am great at. I tried using caching as much as I can but yeah, it's definitely slower than without the plugin. Check if you have the "Low Power Mode" option turned on.

@kfirba
Copy link
Author

kfirba commented Oct 25, 2023

@mallowigi I tried both with this setting on and off, but the slowness is just too much for me.
I guess it's fine for small projects, but as it grows there are more and more directories, files, suggestions, etc. Sadly, it just becomes unusable.

I'm now using Extra Icons just to get "better" icons than the default, and it's okay. Its performance is very very good, but it doesn't do as much as Atom Material Icons

@mallowigi
Copy link
Collaborator

Well since there are many associations it need to check, maybe it takes some time ? I myself often work with projects with more than 10K files, it's not snappy yes but not to the extent of being unbearable...

Also, do you experience it for all projects, or for projects of a certain type only?

@kfirba
Copy link
Author

kfirba commented Oct 25, 2023

I experience it with all projects, however the larger the project, the worse the performance.
When I say "unbearable", I mean seconds. It sometimes takes 5-15 seconds - that's unusable for any real-life work (IMO)

Sometimes when I reset the IDE it works decently, but after switching between projects or updating many files (git pull, for example), the performance degrades

@mallowigi
Copy link
Collaborator

Yeah no, I realized a performance degradation, but not to the point of using seconds... Are you using specific features? Custom Associations? What other plugins are you using?

@kfirba
Copy link
Author

kfirba commented Oct 25, 2023

I didn't tweak any config. Other plugins:

Non-Bundled Plugins:
    org.intellij.plugins.hcl (232.8660.88)
    com.github.copilot (1.3.2.3479)
    org.jetbrains.plugins.go-template (232.9921.89)
    com.github.camork.fileExpander (2.3)
    com.intellij.kubernetes (232.10072.33)
    ru.adelf.idea.dotenv (2023.2)
    com.chrisrm.idea.MaterialThemeUI (8.12.6)
    com.intellij.lang.jsgraphql (4.0.2)
    zielu.gittoolbox (500.0.21+222)
    mobi.hsz.idea.gitignore (4.5.2)

@mallowigi
Copy link
Collaborator

toda haver. I'm not sure I'll be able to find a solution but i'll try anyway.

@kfirba
Copy link
Author

kfirba commented Oct 25, 2023 via email

Copy link

stale bot commented Nov 9, 2023

This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 9, 2023
@nicholasruunu
Copy link

nicholasruunu commented Nov 30, 2023

I also have this issue, I don't even know why.
It's even the same with the directory already open in the tree, so it's not about rendering the icons, it will just not select the file in the tree until you wait 10 seconds.

I'm on Apple M1 Max 64GB, there is something really wrong here. Will uninstall for now but will install again if you want me to test anything.

PHPStorm issue identifying this plugin is 2 years old: https://youtrack.jetbrains.com/issue/IDEA-291684/Sidebar-works-very-slow

@simonschaufi
Copy link

simonschaufi commented Dec 1, 2023

I've also noticed an extreme performance impact. I even blamed PhpStorm for being slow but then somebody told me that this plugin is the cause of it and after disabling the the plugin, it's super fast to navigate to files.

See https://youtrack.jetbrains.com/issue/WI-74977/Improve-performance-of-Select-Opened-File

@SerafimArts
Copy link

The same situation. Only today I figured out the problem, I thought it was an IDEA (ntfs <-> ext4 wsl) problem.

I discovered that in addition to this, the plugin greatly affects the CPU, about 20-30% of i7-10700KF

@lucassith
Copy link

lucassith commented Mar 11, 2024

Same applies to my setup. I got here from IntelliJ support ticket, they checked my CPU profile and told me to disable this plugin.

As it was previously 6-15s to create a file, I feel blissful after disabling this plugin now.

@mallowigi
Copy link
Collaborator

#Maybe it is a specific icon? Do you have a project I can reproduce?

@simonschaufi
Copy link

simonschaufi commented Mar 11, 2024

any huge project, for example https://github.com/organicmaps/organicmaps/ and then work on it for some hours like create a file, delete it again... and after a while it becomes really slow

@lucassith
Copy link

lucassith commented Mar 11, 2024

Right, that's for sure a clue, that you need to have a project opened for a while. Maybe a memory leak?

Here are details on how to enable a profiler in IntelliJ:
https://intellij-support.jetbrains.com/hc/en-us/articles/207241235

From CPU usage support was able to find the reason behind the slowdown, so it may be a valuable hint.

And here is a video on how slow it becomes: https://jbs.zendesk.com/attachments/token/zmMMdyIUtljcl8gsxc4dulwlc/?name=Screencast+from+2024-03-11+10-24-30.webm

@zaalbarxx
Copy link

zaalbarxx commented Mar 18, 2024

https://youtrack.jetbrains.com/issue/IDEA-317983#focus=Comments-27-9501784.0-0

Thinking about it now, maybe it is the problem with the fact that upon expanding the directory the plugin has to check the content of other directories to properly assign a directory icon and that takes time. In our big PHP project, after I disabled the folder icons everything now works smoothly and without any noticable delay, so I would focus on this part.

@mallowigi
Copy link
Collaborator

Funny enough I'm experiencing this in the 2024.2 EAP, but not in the RC...

@TheMikeyR
Copy link

I've noticed extremely slow sidebar especially when using the Select Opened File button, took up to 3 seconds to react.
After I've disabled the plugin, it is now snappy again and moves instantly.

IntelliJ IDEA 2024.1 (Ultimate Edition)
Build #IU-241.14494.240, built on March 28, 2024
Runtime version: 17.0.10+8-b1207.12 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.4.1
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 12
Kotlin: 241.14494.240-IJ

@timothebot
Copy link

@mallowigi Right now the plugin just loads the icons whenever it needs it right? In a CPU snapshot, the getPNG (or the other file types) method in the AbstractIconPatcher class.

In the docs they use a object for the icons.
https://plugins.jetbrains.com/docs/intellij/icons.html#icons-class

What if you load all the default icons like that and the file path then maps to the property?

Or; Is it not possible to load the icons async after the files are already visible?

Sorry if I'm saying things you already tried or are not possible, I don't have a lot of experience with Intelij plugin dev ^^

@mallowigi
Copy link
Collaborator

Not sure what is causing the slowness. I have the feeling that now the IDE doesn't load all the project files but only the first level, then load new icons whenever a folder is opened. Since the native IDE doesn't have a FileIconProvider, it doesn't need to parse the filename and fetch the icon so it's faster.

But that doesn't explain why navigating to the file when clicking on "select opened file" takes ages, it's as if it is doing something else synchronically before showing the file... very unusable.

I've already optimized by keeping a cache of filenames <--> icons when an icon is fetched but like I said, it's unrelated to the same problem. It's not the icon loading, it's the file navigation. I need to understand what is slowing this.

@ralphjsmit
Copy link

It would be amazing as this could get fixed somehow by someone with good knowledge of it with regards on performance, as this is truly the best and nicest and most colorful icon pack for Jetbrains. Can't find any good alternative, but it is a bit a shame that other packs are fast and this awesome pack not. So if there are any Jetbrains plugin specialists out there for a challenge... :)

@mallowigi
Copy link
Collaborator

What other packs?

@timothebot
Copy link

@mallowigi Catppuccin Icons or Extra Icons work without any performance issues

@ralphjsmit
Copy link

Yes, I tried them yesterday and they are fast, so it should be possible to have a fast pack. However, I am super used to the colors of this package right now, and all other packages look super-dull (Catpuccin is the second best, but it is a bit too dull/pastel).

@mallowigi
Copy link
Collaborator

I'll try to see how they implemented it, maybe they are using techniques that I don't know about.

@ralphjsmit
Copy link

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants