This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

File Creation consumes time as number of files increases

I have created a folder in the Nand Flash memory. And the folder consists of multiple files.
The time taken to create a file in the folder is directly proportional to the total number of files in that folder. Reading or searching for a file in that folder hardly consumes any time.

Also if i create a new folder (and the previous folder still exists) then time taken for creating file increases as total number of files in the folder increase. (i.e. time consumed to create file in empty folder is hardly noticeable but as more files are created, time taken to create files increases).

IMO, This should not happen ideally.

even worse observation.
I have few files created in a folder, lets say 100. i delete few files randomly [lets say, the 10th file created (filename: X10), the 20th (XP20), 25th (XYZ25), 35th(X35), 49th(P49), etc.] and then continue to create new files [ab1, Ab3, ab2, ab5]. The newly created file 'ab1' is created in place of 'X10'. 'Ab3' is created in place of 'XP20'. The observation is that the files are created in the place where the last files where deleted (my observation comes from listing the files and the file listing code just reads the files names and sends it on UART). IMO, the files should be created after the last created file. No sorting date wise or in alphabetical order or in the order of creation.

Appreciate your patience & time.

PS: LPC1788. 120MHz core clk. Using Keil File system library.

0