sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
804 stars 39 forks source link

Really high memory usage and then a crash with a lot of new files #6385

Open Monochrome-Sauce opened 4 months ago

Monochrome-Sauce commented 4 months ago

Description of the bug

When there are a lot of files, Sublime Text's memory usage starts to rise (it reached higher than in the attached picture) and it ends up crashing. When the crash happens, the inotify system limit is reached. The system has enough memory to keep operating.

Additional information: the files were added by a build system and appear in the .gitignore file.

image

Steps to reproduce

  1. Start Sublime Text.
  2. Generate thousands of build files for good measure.

Expected behavior

Not crash when many files get created, and to not use a dozen gigs of memory.

Actual behavior

Crash with high memory usage because of inotify limit.

Sublime Text build number

4175

Operating system & version

Fedora Kionite 40

(Linux) Desktop environment and/or window manager

KDE 6

Additional information

No response

OpenGL context information

No response

BenjaminSchaaf commented 4 months ago

Does it happen in safe mode?

Monochrome-Sauce commented 4 months ago

Yes, and even faster.

Monochrome-Sauce commented 4 months ago

It also happens on an Arch (Sway) machine with completely different hardware (same Sublime Text build)

BenjaminSchaaf commented 4 months ago

How many files are being created?

Monochrome-Sauce commented 4 months ago

My case has over 1000, but it also happens at ~600.

Monochrome-Sauce commented 4 months ago

Memory usage rose by hundreds of MiB for subl --safe-mode open over the weekend with much less files.

BenjaminSchaaf commented 3 months ago

Creating 100,000 files very quickly on my end locks up ST for a little bit, but memory usage goes up barely 100MB and the process goes back to idle afterwards. As such I really can't reproduce this issue.