1000x1000 float 陣列 → 4MB byte[],寫入 1.5s,讀取同樣慢。
{_id, chunkIndex, data},讀取時並行獲取合併。GridFSBucket bucket = GridFSBuckets.create(database);
ObjectId id = bucket.uploadFromStream("matrix", new ByteArrayInputStream(bytes));
GridFSDownloadStream stream = bucket.openDownloadStream(id);對比 byte[] 直存 vs Protobuf + 分塊 vs GridFS 在寫入吞吐、讀取延遲、存儲空間三維度表現。