MFS dir listing slow

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MFS dir listing slow

跳至解决方案
505 次查看
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.

标签 (2)
0 项奖励
1 解答
318 次查看
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 项奖励
2 回复数
319 次查看
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 项奖励
318 次查看
adyr
Contributor V

Thanks RadekS, that is excellent news.

Adrian.

0 项奖励