Sublime Forum

Painfully slow mass saving

#1

image
I just modified 3000 txt files with regex replacement.
The app is so slow and takes so much resources to save my modifications, and for what? text files?
Tell me what is the problem. Idk where to ask a dev to look into it.
There are also other instances where I close ALL 3000 tabs and takes forever.
Every save takes averagely 1.15 seconds, multiplied for 3000 it will take 1 HOUR to save them all. bruh

0 Likes

#2

Find in Files opens each affected text file. Each file is tokenized for syntax highlighting and plugins such as SublimeLinter or LSP might jump in to provide code intelligence or diagnostics, each of which might require some resources depending on contents’ size, syntax and overall projects complexity. Information handled for open files is way more than just an array of chars.

Saving files should be very fast. Plugins such as LSP or formatters however may intercept that process to take action on content before actually saving. Such operations may be expensive.

A disk usage of 46.8MB/s indicates your SSD/HDD to already be quite busy, either saving files or still running the “find and replace” or any other operation in background. Modifying files might also cause ST’s indexer to jump in, updating symbol tables.

Note that even on SSDs you can’t expect 7GB/s writing tons of small files as command queues and IOPS are the limiting factor then.

0 Likes

#3

@deathaxe

  1. no other process doing while saving, the app is frozen anyway while saving is in progress, i couldnt even if i wanted.
  2. LSP not installed, nor any other plugins, i already tried raw with no plugins, same. i can’t code anyway except regex.
  3. idk if the app has a default formatter, i didnt enable or installed any .
0 Likes

#4

It seems the find and replace process itself, which runs synchronously in UI thread freezing whole UI.

At least on my end whole UI is frozen in recent ST4178, while attempting to remove all comments from linux kernel sources. :smiley: :snail:.

That’s indeed not ideal. Sitting here for about 15mins already, waiting for completion. Ok, these are 30k files with millions of operations. Maybe takes a day or two.

2 Likes

#5

image
Everytime I mass close a lot the tabs (2900 this time). Still painfully slow.

0 Likes

#6

I forgot to menzion a thing, the more mass modifications with regex I do the more slow the mass saving becomes. So at the beginning is decently fast, after 30+ mass modifications u will see the difference.

0 Likes