Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Speed up Ghost boot time #10758
Speed up Ghost boot time by replacing the JS-only RSA key generator library with a native alternative.
After profiling the initial boot, I saw the key generation library took around 25% of the boot time. (Flat section in the middle with red at the top.) JS-only libraries tend to be pretty slow for crypto.
I benchmarked some alternatives and
Server (in development mode) boot time on my laptop:
So it looks like it's about 20% faster for me.
Just required a quick switch-out but should work the same.
Looking at where
@kevinansfield Sure thing! The library only relies on OpenSSL but maybe there are situations where this could cause a problem.
If they have a measurable impact (especially on boot time) and the code isn't obscured too much then we're definitely open to those sorts of contributions
referenced this pull request
Jun 17, 2019
Hey @neosilky Only just got round to catching up with this.
@rishabhgrg I have moved that issue to this repo as the changes concern files in here
Jun 21, 2019
1 check passed
Haha - excellent! Would love to hear if it made much of a difference for your Pro platform.
Need to get around to sending in my other changes... It's a fairly minimal speedup for me, but now I know it's even more beneficial on other machines, they should still be useful.