griddycode icon indicating copy to clipboard operation
griddycode copied to clipboard

performance issue when too many folders/files in a diretory

Open dropalways opened this issue 1 year ago • 7 comments

my downloads folder got ALOT of shit in it and i was tryna open it and it was lagging heavily

dropalways avatar Mar 19 '24 17:03 dropalways

about 21,527 Files, 2,877 Folders

dropalways avatar Mar 19 '24 17:03 dropalways

You got the reason right there if you trying to open a folder with that many files/folders.

lassejlv avatar Mar 19 '24 20:03 lassejlv

To handle such scenarios the file_manager.gd script should be updated to load in chunks

face-hh avatar Mar 20 '24 13:03 face-hh

Just fix this by slicing the file picker's choices down to a limit like 10 before and after the current choice or any other sane number

MinecraftPublisher avatar Mar 25 '24 19:03 MinecraftPublisher

@face-hh do you want me to make a PR for this and you to close this issue aswell? the fix should be easy

MinecraftPublisher avatar Mar 26 '24 08:03 MinecraftPublisher

UPDATE: By limiting item loading to 21 at a time and patching the focus_on to be compatible with this new change, I have significantly reduced the lag of the file picker to the state that it now actually loads your items and works at like 2 fps (further fixes coming soon)

MinecraftPublisher avatar Mar 26 '24 08:03 MinecraftPublisher

Yep, learned that the hard way by opening my 200gb downloads folder

rathlinus avatar Apr 28 '24 21:04 rathlinus