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

Need to Set Explicit Working Directory in Protocol Handlers #513

Closed
Sewer56 opened this issue Aug 3, 2023 · 1 comment
Closed

Need to Set Explicit Working Directory in Protocol Handlers #513

Sewer56 opened this issue Aug 3, 2023 · 1 comment
Assignees
Labels
meta-improvement An issue that improves an existing feature

Comments

@Sewer56
Copy link
Member

Sewer56 commented Aug 3, 2023

Improvement

Currently

Currently, protocol handlers like nxm:// don't set a specific working directory.
This is especially problematic on non-WIndows, where it defaults to the user's $HOME folder.

Because we use Microsoft's Host Builder (Host.CreateDefaultBuilder) during startup, it scans the current working directory recursively [as it's most likely looking for something]. This can cause significant delays if the current working directory contains many files.

In my case, this (currently) causes a delay of approximately 7 minutes in IPC operation as my home folder contains over 500,000 files; which the host builder is taking forever to look through.

We want

For this, and other related reasons, we should set a specific working directory for the protocol handlers.

Design

At the very least on non-Windows systems, we need to modify the protocol handler registration code to set a specific working directory.

This will include updating IProtocolRegistration to allow specifying a working directory.
In the case of Linux, we need to set the Path field inside the .desktop file to the location of the working directory.

@Greg-Nexus Greg-Nexus added meta-improvement An issue that improves an existing feature points: 2 labels Aug 3, 2023
@halgari
Copy link
Collaborator

halgari commented Aug 7, 2023

We should investigate as part of this why it's scanning all the folders, and if we can stop the scan (and use our hardcoded config paths)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta-improvement An issue that improves an existing feature
3 participants