-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
Fix "illegal operation on a directory, realpath" on RAM Disk #229
Open
duykhang53
wants to merge
3
commits into
browserify:main
Choose a base branch
from
duykhang53:master
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+26
−2
Open
Changes from 2 commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this means we pay a performance cost every time. is this necessary, or on a given system where it fails, will it always fail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is designated for the
postcss-import
on RAM Disk. This means the I/O speed is significantly improved. The production build of my Angular project takes 60-120 secs withfs.realpath.native()
on my 2TB Seagate FireCuda SSHD but it only takes ~60 secs on RAM Disk mounted by imDisk withfs.realpath()
(wherefs.realpath.native()
is illegal operation). So in general, no performance costs are paid.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how that's possible - this is always calling realpath.native, and when it errors, is adding the cost of calling realpath.
(to be clear, I have no idea what imDisk is, and the last time I heard anything about RAM Disks was in the late 1990s)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imDisk is a software to create a virtual disk using RAM on Windows: https://imdisk.en.lo4d.com/windows
The cost of calling is the trade-off for I/O speed and it only adding the call on illegal operation error.
You can clone this repository using Windows on both RAM Disk created by imDisk and your HDD/SSHD/SSD https://github.com/scttcper/ngx-toastr. After the clone, run
npm i && npm start
. On RAM Disk, the server will fail and you will getThe cause is from
postcss-import
using this repository to resolve the imported files from node_modules in src/style.scss. So if you alter ./node_modules/resolve/lib/async.js, the error is gone.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm concerned about: