conf icon indicating copy to clipboard operation
conf copied to clipboard

If store(fs.writeSync) frequently, IO tall use, maybe need throttle?

Open dengyaolong opened this issue 7 years ago • 3 comments

I use conf to save some stat KPI(a lot of count and timing), combo and send it to my stat server. However, user maybe manipulate frequently, and conf will writeFileSync frequently too, Its there any solution, may be throttle?

dengyaolong avatar Jul 26 '17 03:07 dengyaolong

I don't think conf is a good fit for that use case to be honest. Like the name implies, and the description of the package states

Simple config handling for your app or module

It's for config handling, not for writing bulks of data to disk because from what you say, it looks like you should use streams for that.

SamVerschueren avatar Jul 26 '17 06:07 SamVerschueren

How frequent and how much data?

sindresorhus avatar Jul 26 '17 21:07 sindresorhus

as most 100 times / sec. I agree with @SamVerschueren , now I am trying write a new “electron-store“, add to memory, and save after combo.

dengyaolong avatar Jul 27 '17 03:07 dengyaolong