gentlegiantJGC / ACExplorer

A file explorer for the Assassin's Creed Unity forge file format. Written in python
68 stars 23 forks source link

Population of tree takes long time #1

Closed gentlegiantJGC closed 6 years ago

gentlegiantJGC commented 7 years ago

When a file is decompressed from a datafile a windows file is created in /temp/tempFiles The name of the windows file is the fileID of that file in the archive and the contents points to the decompressed file and contains other data. When the program is loaded it goes through these files and populates the TK treeview with the already decompressed files. The issue is that the number of these files can get high very quickly (I got to 20,000 iirc without even trying) and it takes a while for the drive to retrieve them. (a few minutes) It seems if the program is closed and opened they are loaded quicker than the first time (I presume because they are loaded into either RAM or a part of the drive that is quicker to read from)

Ideally a solution should be found where tens of thousands of files don't need to be opened when the program is opened. Originally all this data was stored in one dictionary that was written to one file at the user's request but this was changed when the button was removed and the save process moved to the point of decompressing. It was not realistic to save a huge dictionary each time a file was decompressed