[GH-ISSUE #135] mkcert is slow on darwin (due to nss support) #80

Closed
opened 2026-02-25 22:32:33 +03:00 by kerem · 1 comment
Owner

Originally created by @crawshaw on GitHub (Feb 15, 2019).
Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/135

On a MacBook Air 2018:

$ time (./mkcert -help &> /dev/null)

real	0m1.010s
user	0m0.657s
sys	0m0.309s

This is caused by the init function in truststore_nss.go, which invokes the brew command. If I comment out the init function:

$ time (./mkcert -help &> /dev/null)

real	0m0.025s
user	0m0.013s
sys	0m0.010s
Originally created by @crawshaw on GitHub (Feb 15, 2019). Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/135 On a MacBook Air 2018: ``` $ time (./mkcert -help &> /dev/null) real 0m1.010s user 0m0.657s sys 0m0.309s ``` This is caused by the `init` function in truststore_nss.go, which invokes the brew command. If I comment out the init function: ``` $ time (./mkcert -help &> /dev/null) real 0m0.025s user 0m0.013s sys 0m0.010s ```
kerem closed this issue 2026-02-25 22:32:33 +03:00
Author
Owner

@crawshaw commented on GitHub (Feb 15, 2019):

When actually generating a key, there are other sources of slowness. Total generation time with nss removed is 1s. About 100ms of that is spent in generateKey.

It seems to take mkcert 200ms to reach the beginning of the makeCert method.

<!-- gh-comment-id:464107230 --> @crawshaw commented on GitHub (Feb 15, 2019): When actually generating a key, there are other sources of slowness. Total generation time with nss removed is 1s. About 100ms of that is spent in `generateKey`. It seems to take mkcert 200ms to reach the beginning of the `makeCert` method.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mkcert#80
No description provided.