Performance issue of get subfolder/file collection if it is large!!!


  • Hi all,

    If I want to get the subfolder/file collection of one folder, which has lots of subfolders and files, I have to use Windows.Storage.StorageFolder.GetFoldersAsync()/GetFilesAsync(), however, the Runtime Broker.exe would consume lots of memory. And these memory cannot be released until I shut down the APP. I found that if I use FilePicker to browse this complex folder, however, there is no memory consumed by Runtime Broker.exe, and the collection can be shown very quickly. So my question is: In metro style APP, how can I get the subfolder/file collection of one folder without Runtime Broker consuming memory, and it just has the same performance level as FilePicker? Thanks!

    BTW, I sent a post with similar theme when I used Windows 8 Developer Preview, and it is said that this issue is a known issue. Now I used Window 8 Consumer Preview, however, I still found this issue existed. Thanks!
    • Edited by Dongjjing Tuesday, March 13, 2012 8:58 AM
    Tuesday, March 13, 2012 8:54 AM

All replies

  • I just checked out bug database - it appears that we are still tracking this issue in CP.  I found the previous post but am not sure if Rob is referring to the same bug that I just found in our db.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator

    Tuesday, March 13, 2012 8:37 PM
  • Check out the StorageDataSource sample:


    For better performance with large collections of files, you want to use a virtualizing data source.

    Wednesday, March 14, 2012 1:54 AM
  • Hi Matt Small,

    Thanks! I wish this can be fixed before GM.

    Wednesday, March 14, 2012 6:09 AM
  • Hi Ari Polsky,

    Can you show me how to bind other properties besides Name/Thumbnail? For example, if I modify the project to bind the property DateCreated, or Path, etc, the value cannot be shown. Thanks!

    Wednesday, March 14, 2012 6:11 AM
  • In the Consumer Preview the only properties supported for binding are Name, Thumbnail, and all the ones available in the property accessors. For example, you can bind to rating because it's in MusicProperties, you can bind to DateModified because it's in BasicProperties, etc.

    Wednesday, March 14, 2012 3:32 PM
  • Hi,

    I use the following to bind, but nothing shown, can you tell me why? In fact, I have tried to bind these properties but cannot be shown. Thanks a lot!


    Thursday, March 15, 2012 11:54 AM
  • are you sure the files you're showing have a rating defined? If there's no rating it won't show 0, it'll show nothing because the rating value is null.
    Thursday, March 15, 2012 3:27 PM
  • Hi Ari Polsky,

    I test the sample, it works now. But if the collection has more than 5000 items, and I scroll them from begin to end, I found that Runtime Broker takes up more than 300MB memory in total. And it cannot be released in time.


    Tuesday, March 20, 2012 8:11 AM
  • This is the same as the bug that I was talking about originally.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator

    Tuesday, March 20, 2012 1:00 PM