-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
perf(fs): use realpathSync native for >15%. improvement [HH-446] #2522
Conversation
|
|
This CLA covers any potential contribution to Nomic that does not necessarily include hardhat? |
This looks really interesting, thanks a lot @sambacha, we'll take a look as soon as we can.
I'm not really sure. Tagging @alcuadrado that knows this stuff. |
I've just removed the CLA bot. Now that we relicensed everything to MIT it's no longer necessary. |
Thanks guys, also would you be interested in leveraging Turborepo? I have another branch with that setup to build the entire repository. It is much faster for building the monorepo, should check it out imho |
Also btw thanks for addressing my CLA question, makes contributing much easier |
That's really interesting, we'll take a look. Thanks for the tip! |
There's something weird going on with github actions here. I think this PR was created when it was down |
Can you add an empty commit or give me access to push to your branch, @sambacha? Thanks! |
I have added you as a collaborator with admin priv. to the repo! Will fixup this PR now that I know the typescript versioning is not an issue |
I've been reading more about this, and it's a great idea! |
This PR was marked as stale because it didn't have any activity in the last 30 days. Please excuse us if we didn't have enough time to review it and get it merged. If you are still interested in getting these changes applied, please leave a comment indicating so. Otherwise, it will be closed in 7 days. |
This PR was closed because it has been stalled for 7 days with no activity. |
This PR was closed because it has been stalled for 7 days with no activity. |
Performance: Faster Load Time with
realPathSync.native
TypeScript now leverages a system-native implementation of the Node.js
realPathSync
function on all operating systems.Previously this function was only used on Linux, but in TypeScript 4.5 it has been adopted to operating systems that are typically case-insensitive, like Windows and MacOS. On certain codebases, this change sped up project loading by 5-13% (depending on the host operating system).
Reference material
For more information, see the original change here, along with the 4.5-specific changes here.
ref: https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/#real-path-sync-native
Discussion
This is a rough cut, would like some feedback if you guys are interested in these possible changes (it does enforce at least typescript 4.5, and you are using ~ for semver of typescript)
Additionally, changing how
tmpDir
is managed with insteadmkdtmp
the nodejs utility is something I observed as a possible easy change that would yield very slight gain (potentially). Another would be instead of downloading repeatedly solidity compilers offer a global config option (I am sure users would do this) + offer a more compressed binary for solc native (quicker downloads). etc etc.Notes
Originally scoped out files
Reference
fs.([1], :[2])