Skip to content
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

CLI: write logstream to memory #22571

Open
yannbf opened this issue May 16, 2023 · 0 comments
Open

CLI: write logstream to memory #22571

yannbf opened this issue May 16, 2023 · 0 comments

Comments

@yannbf
Copy link
Member

yannbf commented May 16, 2023

This is a possible, nice to have followup of #22554
Currently, the log stream when running npm install as part of storybook init is written directly to the hard drive. Users would be thankful if this operation could be avoided to avoid multiple write operations to the hard drive in a short period of time.

Instead, should we consider writing into memory instead, until the file is finally written? This has several benefits:

  1. Write operations to the hard drive are slow in comparison to the memory
  2. There is no need to clear the temporary file if error logs are not written to the hard drive; just clear the memory.
  3. Reading from the temporary file can be avoided completely because we don't need it anymore

Let's just write to the hard drive, when it is necessary (producing the final log file), otherwise, let's avoid it as far as possible.

Originally posted by @valentinpalkovic in #22554 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant