gpu-dawn: use buffered reader (reduce gzip extraction time 76s -> 5.5s)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
eac7efa5d1
commit
ea93eea21f
1 changed files with 2 additions and 1 deletions
|
|
@ -398,7 +398,8 @@ fn gzipDecompress(allocator: std.mem.Allocator, src_absolute_path: []const u8, d
|
|||
var file = try std.fs.openFileAbsolute(src_absolute_path, .{ .mode = .read_only });
|
||||
defer file.close();
|
||||
|
||||
var gzip_stream = try std.compress.gzip.gzipStream(allocator, file.reader());
|
||||
var buf_stream = std.io.bufferedReader(file.reader());
|
||||
var gzip_stream = try std.compress.gzip.gzipStream(allocator, buf_stream.reader());
|
||||
defer gzip_stream.deinit();
|
||||
|
||||
// Read and decompress the whole file
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue