Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MutableApp.toWebPart is blocking the application #39

Open
luithefirst opened this issue Sep 6, 2021 · 3 comments
Open

MutableApp.toWebPart is blocking the application #39

luithefirst opened this issue Sep 6, 2021 · 3 comments

Comments

@luithefirst
Copy link
Member

MutableApp.toWebPart is the default entry used in most demos and applications. This also builds a renderer : Server with fileSystemRoot = Some "\" (https://github.com/aardvark-platform/aardvark.media/blob/master/src/Aardvark.UI/MutableApp.fs#L128).
On Windows this then performs a GetAllDrives and then tries to enumerate all files, but only to check if it is empty: https://github.com/aardvark-platform/aardvark.media/blob/master/src/Aardvark.Service/aardfs/FileSystem.fs#L189

There are scenarios with network drives that then result in blocking the application startup seemingly indefinitely (continuing after 10-12mintures). When the network drives that cause the issue are inspected with a windows file explorer it's also "looking" for a very long time without any progress.

I'm not sure if the root path "" should be considered valid. From my analysis, I would see two tasks:

  1. It should be possible to deactivate this feature or even require it to be activated explicitly
  2. The default behavior should no longer enumerate all drives + files on startup
@haraldsteinlechner
Copy link
Member

i would opt for making it optional. For production the browser needs to be reworked (possibly as addon-not core) anyways...

@luithefirst
Copy link
Member Author

As quick fix it might be feasible to either make "rootEntries" lazy or query the "rootEntries" every time in GetEntries. In my application, this will then never get called, while it should not change the current behavior.

It sounds reasonable to require that the inclusion of a FileBrowser needs to be specified on the user/app side. Our "14 - OpenFile" example seems to be a suitable playground for this.

@luithefirst
Copy link
Member Author

I've created a new version that delays the enumeration of all drives. This resolves the issue for me since the function then is never run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants