MFS dir listing slow

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MFS dir listing slow

Jump to solution
490 Views
adyr
Contributor V

Hi,

I have run the usbdisk_twrk64f120m example that is part of the KSDK 1.1. If I type dir in the shell, with a thumb drive that contains around 2000 files, it takes around 9 minutes to list the contents. If I rem out the line 'error_code = ioctl(dir_ptr->FS_PTR, IO_IOCTL_GET_LFN, (void *)&dir_ptr->LFN_DATA);' it only takes around 10 seconds. So getting the long file names is very inefficient in this case.

I have also created a project using the fatfs file system and emulated the dir process and that takes 12 seconds to list all the files with the LFN included.

I seem to remember a solution posted for MQX 4 and MFS where the search for the LFN started on the previous sector instead of the beginning each time but I can't find it now. Can anyone point me to that or recommend how it could be done with the new platform?

Thanks,

Adrian.

Labels (2)
0 Kudos
1 Solution
303 Views
RadekS
NXP Employee
NXP Employee

Hi Adrian,

Yes, you are right. It is known issue. Big number of files/directories slows down listing.

This was already fixed in new reworked MFS and it will be part of MQX 4.2 and KSDK 1.2. Current plan for release is end of this month. So, it should be available during next few days.

I hope it helps you.

Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
2 Replies
304 Views
RadekS
NXP Employee
NXP Employee

Hi Adrian,

Yes, you are right. It is known issue. Big number of files/directories slows down listing.

This was already fixed in new reworked MFS and it will be part of MQX 4.2 and KSDK 1.2. Current plan for release is end of this month. So, it should be available during next few days.

I hope it helps you.

Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
303 Views
adyr
Contributor V

Thanks RadekS, that is excellent news.

Adrian.

0 Kudos