Running...

Write

1. Write 100KB of data in one operation, repeat it 1000 times, for a total of 100MB.
每次写入 100KB 数据,重复 1000 次,共 100MB

FileSystemFileHandle createWritable (Main Thread):
indexeddb: , created 1000 records(创建了 1000 条记录)
opfs-tools (WebWorker):

opfs-tools cost ~1x times as much as Node.js
opfs-tools 与 Node.js 耗时差不多

Read

2. Read 100KB in a single operation, perform 1000 reads with random positions.
每次读取 100KB,随机位置读取 1000 次

Blob slice (Main Thread):
indexeddb: , read 1000 records sequentially(顺序读取前面创建的 1000 条记录)
opfs-tools (WebWorker):

opfs-tools cost ~4.3x times as much as Node.js
opfs-tools 耗时大概是 Node.js 的 4.3 倍

opfs-tools cost ~1.4x times as much as Node.js
opfs-tools 耗时大概是 Node.js 的 1.4 倍