Skip to content

Conversation

@crwood
Copy link
Member

@crwood crwood commented Dec 5, 2021

Fixes #412.

Due to the Python interpreter's notoriously slow start up time, I opted to read/parse the Magic-Folder API port directly from the api_client_endpoint file (added by tahoe-lafs/magic-folder#593) rather than calling and parsing the output of the magic-folder show-config subcommand. On my modest system, the amount of time saved by not shelling out to magic-folder ends up being quite significant:

% time magic-folder show-config > /dev/null            
magic-folder show-config > /dev/null  0.71s user 0.08s system 98% cpu 0.804 total
% time cat .magic-folder/api_client_endpoint > /dev/null
cat .magic-folder/api_client_endpoint > /dev/null  0.00s user 0.00s system 77% cpu 0.001 total

@crwood crwood merged commit fbe3a46 into master Dec 5, 2021
@crwood crwood deleted the 412.magic-folder-api-port branch December 5, 2021 04:10
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

Successfully merging this pull request may close these issues.

Gridsync parses stdout in order to determine the Magic-Folder API client endpoint

2 participants