You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As clearly stated in https://nodejs.org/api/fs.html#synchronous-example, The synchronous APIs block the Node.js event loop and further JavaScript execution until the operation is complete so we should only use it in testing context
Expected behavior
Switch to equivalent async api
The text was updated successfully, but these errors were encountered:
Yes we should not use the fs sync api for recurring actions doing busy times. That would be only the db, which does not use the sync api. However, for script-ish tasks, like starting the validator cli and reading keystores it really doesn't matter in my opinion
The process is not gonna do anything else until it has read the keystores, so it doesn't matter if it's sync or async for a performance point of view.
The only usage of the fs sync api that's happening during node's high load is:
persisting SSZ invalid objects (can be an issue, large files, frequently)
persisting ENR (not an issue, tiny file, infrequently)
Describe the bug
As clearly stated in https://nodejs.org/api/fs.html#synchronous-example,
The synchronous APIs block the Node.js event loop and further JavaScript execution until the operation is complete
so we should only use it in testing contextExpected behavior
Switch to equivalent async api
The text was updated successfully, but these errors were encountered: