Skip to content

Discussion: Investigate the fetching of unneeded byte array per storage item #6089

Closed
@lukeblevins

Description

@lukeblevins

Description

Previously, we used the FullTrustProcess for all item thumbnails and an optimization was put in place to associate the underlying byte array with the ListedItem. I'm proposing that we remove this trait from ListedItem and ItemViewModel because we could see a small performance gain for the items affected through simply fetching the StorageItemThumbnail and setting it as the BitmapImage source directly.

The only area leveraging this byte array is the Properties dialog. In my opinion, this makes little sense and we should load thumbnails from the filesystem for the Properties experience on-demand.

Steps To Reproduce

Load a large directory.

Expected behavior

As we know, users expect item thumbnails to appear quickly. I think we should do this without the overhead of converting the thumbnail into a byte array only to subsequently form a bitmap.

Files Version

v2.0

Windows Version

Windows 11, 10

Relevant Assets

Open questions:

Is a converted byte array via the extension method still somehow preferrable over direct use of the thumbnail stream with BitmapSource.SetSourceAsync(fileThumbnail) ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions