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

tests: disable parsing of system CA certificates in CLI tests #2348

Merged
merged 2 commits into from
Oct 7, 2023

Conversation

yuja
Copy link
Contributor

@yuja yuja commented Oct 7, 2023

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

yuja added 2 commits October 7, 2023 22:27
…ic config

The code compiles on all platforms, so I think `if cfg!(..)` is better.
On my Debian laptop, openssl_init() takes ~30ms to load the default CA
certificates serialized in PEM format, and the cost is added to each jj
invocation. This change saves 20s (of 50s) on my machine.

% wc -l /usr/lib/ssl/cert.pem
3517 /usr/lib/ssl/cert.pem
Copy link
Member

@martinvonz martinvonz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! I've also seen in profile output that it takes a while but I didn't think of speeding up our tests like this.

@yuja
Copy link
Contributor Author

yuja commented Oct 7, 2023

I've also seen in profile output that it takes a while but I didn't think of speeding up our tests like this.

That would vary across platforms. On macOS, the system CA might be provided differently, and this might not have huge impact.

@yuja yuja merged commit 7f4fe22 into jj-vcs:main Oct 7, 2023
@yuja yuja deleted the push-nokvtpolvpul branch October 7, 2023 17:41
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.

2 participants