FilePicker.PickMultipleAsync very slow #18199
Labels
area-essentials
Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info
platform/windows 🪟
t/bug
Something isn't working
t/perf
The issue affects performance (runtime speed, memory usage, startup time, etc.)
Milestone
Description
Using the
FilePicker.PickMultipleAsync
seems to be very slow. I have a process where a user selects multiple files (which will later be parsed). The method to pick the files is much slower than the code that actually reads/parses the files afterward! This shouldn't be the case.File picker is basically unusable due to the many seconds of latency between when the dialog is closed and the results become available (i.e. when the method returns).
It seems like the file picker actually touches/reads the files after the user closes the dialog? Picking files in a location with high latency (e.g. a network drive) is much slower than picking the same files from local system.
Here you can see the time the FilePicker is busy, picking about 250 files (each ~100kb), it takes almost half a minute for the file picker to return the result!
The time between closing the picker dialog and
await FilePicker.Default.PickMultipleAsync()
completing seems to increase linearly the more files are selected.Testing with VS 17.7.5 and .NET7 with an empty/boilerplate MAUI Blazor project. Building for release/debug does not appear to impact the issue. Deploying to windows, win-x64, all tests on a windows-11 machine.
Steps to Reproduce
PickMultipleAsync
(awaited or not, doesn't matter)Link to public reproduction project repository
No response
Version with bug
7.0.96
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: