Open MARCROCK22 opened 4 days ago
Yes, both of them are pipelined as both of them are running all the commands on the same "event loop tick"
edit: you can also use
const multi = client.mulit();
for (let i = 0; i < 10; i++) {
multi.get(i.toString());
}
const results = await multi.execAsPipeline();
In case you are executing the commands once - an array of promises + Promies.all (or similar) is the most performant way as you don't create unnecessary objects/memory. If you are executing the same commands multiple times multi would perform better as the commands will be encoded once and reused for every executing.
Description
how can I check if something is being executed as a pipeline? I know that docs says this code is automatically handled as a pipeline because they are in the same "tick":
but
is this being executed as a pipeline?