godot icon indicating copy to clipboard operation
godot copied to clipboard

Don't rescan filesystem when duplicating

Open KoBeWi opened this issue 1 year ago • 7 comments

Follow-up to #93372

Makes FileSystem Dock not rescan when duplicating a file or directory. I also tweaked the behavior from #97075 - when EditorFileSystem performs an operation, it doesn't emit changed signal immediately, instead queuing it to the next frame. This ensures that batch operations don't cause more updates than necessary.

There are still some problems though, like error prints or crash when deleting duplicated script. Not sure what causes them yet.

KoBeWi avatar Sep 16 '24 20:09 KoBeWi

Any idea why it's failing on godot-cpp?

fire avatar Sep 17 '24 18:09 fire

Nice job! It's working very well!

Hilderin avatar Sep 19 '24 23:09 Hilderin

Tested with a project with a couple thousand of files... The editor seems frozen and doing nothing before reimporting the assets. Maybe add a progress dialog while actually coping the files.

Demonstration:

https://github.com/user-attachments/assets/05816bb9-4a88-4162-a7ef-0bb9026e1265

Hilderin avatar Sep 19 '24 23:09 Hilderin

Added progress bar for copying files (not pushed yet):

https://github.com/user-attachments/assets/14290a26-e088-4a29-9e9a-e30a4e7d737f

Although feels to me that it makes the operation slower.

KoBeWi avatar Sep 20 '24 22:09 KoBeWi

Although feels to me that it makes the operation slower.

Be sure to pass false to p_force_refresh parameter of the step method. I saw a big help on performance using that trick.

Hilderin avatar Sep 21 '24 01:09 Hilderin

Ok all should be fixed now.

KoBeWi avatar Sep 21 '24 14:09 KoBeWi

Very nice the new progress bar. Everything seems to work perfectly.

Hilderin avatar Oct 01 '24 21:10 Hilderin

Thanks!

Repiteo avatar Oct 25 '24 18:10 Repiteo