elves / elvish

Powerful scripting language & versatile interactive shell
https://elv.sh/
BSD 2-Clause "Simplified" License
5.67k stars 299 forks source link

store:del-* with multiple arguments #675

Open notramo opened 6 years ago

notramo commented 6 years ago

These commands currently only accepts one argument. It is slow (with a lot of I/O) if a lot of commands are deleted. Does the server save the changes after every deletion? In this case, if the ṡtore:del-cmd function could accept more arguments, a lot of I/O could be avoided.

xiaq commented 6 years ago

Hmm, that is a fair point. The overhead likely comes from the IPC round trip instead of IO though; how many calls are we talking about here?

Also, note that del-cmd's sequence number is kind of funny; see commit message in 89bc1e5fa6f56995898f0ffe322558cc72e79efc.

notramo commented 6 years ago

I don't know how many I/O calls does it cause, but it requires all the hard disk I/O capacity, and the script is very slow. Isn't the IPC socket on tmpfs?