weixin_40007541
weixin_40007541
2021-01-08 08:06

super huge folder

To deal with super huge folder which contains tons of sub-folders and files, I make the following changes: 1. Add folder database to store the size and last sizing time of the folder. 2. When properties menu of a folder is clicked, if the last sizing time is lessing than 3 days, folderSize will directly read the size from the database. Or else, folderSize will size the folder and save the size in database. 3. When LoadFilesListTask works, it will check if the size of the folder is in database or not. If yes, it will load the size. 4. If sorted by size, folder will also do. This may not be needed by everyone, so it will be better if someone make super huge folder as a setting, so we can use it when we need it.

该提问来源于开源项目:TeamAmaze/AmazeFileManager

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

8条回答

  • weixin_39845206 weixin_39845206 4月前

    And also, FilePreloaderLibrary exists.

    点赞 评论 复制链接分享
  • weixin_40007541 weixin_40007541 4月前

    Actually I'm dealing with an instant message folder, and it contains millions of files in it. My storage is almost full, so I want to delete something in it. before that, I have to know the size of folders in it. I try other file managers in the app market, but all fail me. That's why I have to make this commit. Now it's working for me. I send this commit just in case someone might need it, and it's a thank you to you guys and Amaze.

    点赞 评论 复制链接分享
  • weixin_40007541 weixin_40007541 4月前

    By the way, if I want to discuss with you, how can I contact you?

    点赞 评论 复制链接分享
  • weixin_39791446 weixin_39791446 4月前

    yes, is already working on it in a seperate repo. You can work with him on it. Also, you can simply create an issue, about the things you're interested in improving and we'll have a discussion.

    点赞 评论 复制链接分享
  • weixin_40007541 weixin_40007541 4月前

    I will always be available if you need my help.

    点赞 评论 复制链接分享
  • weixin_39845206 weixin_39845206 4月前

    By the way, if I want to discuss with you, how can I contact you?

    Mail list.

    点赞 评论 复制链接分享
  • weixin_39845206 weixin_39845206 4月前

    I think it would be better to optimize the individual processes (like loading the files, loading the metadata, size, etc.) before deciding to use a cache. Also, see #707, #737, #843, #1107

    点赞 评论 复制链接分享
  • weixin_39791446 weixin_39791446 4月前

    that's lot of work you put into. Please have a discussion first, before you go out working on such big issues.

    点赞 评论 复制链接分享

相关推荐