Large files
Files of 10 GB open in seconds, without being loaded in memory.
Read as they are shown
The viewer reads the structure of the file, then only the values it shows, by ranges, instead of loading the whole file. The extension holds about 70 MB for a file of 10 GB: its structure and a cache of 64 MiB.
This applies to local files, and also over Remote SSH, WSL and in containers, where the extension runs next to the file.
- Opening
-
Shows its progress in a notification after a second, with a Cancel button; VS Code stays usable meanwhile. A file whose reading was cancelled offers Read again; closing its tab stops the reading.
- The grid
-
Reads its rows by blocks as it scrolls, at any position of the file, in about a millisecond per block.
- Charts
-
Read only the channels they plot, and their time channels. A curve of more than 4 million samples is drawn from an overview computed once in the background; see Large channels.
- XY charts
-
A pair of more than 4 million samples is drawn by the extension from the file; see Curves of any size.
- Exports
-
Read and written by blocks, with a progress notification and Cancel; see Copy and export.
Measured times
Measured on an Apple M1 Pro with 16 GiB, with the synthetic files of the repository (one group of three channels: a timestamp, a DBL and an I32).
| File | Rows | Structure read in | A block of rows of the grid |
|---|---|---|---|
20 MB |
714,285 |
4.6 ms |
0.1 ms |
1 GB |
35,714,285 |
228 ms |
0.9 ms |
10 GB |
357,142,857 |
2.5 s |
0.9 ms |
HDF5 files of 1 GB, written by h5py, on the same computer:
| Dataset | Structure read in | A block of rows of the grid | All its values |
|---|---|---|---|
Contiguous |
8 ms |
0.5 ms |
0.69 s |
Appended (chunks, extensible array) |
8 ms |
0.5 ms |
0.55 s |
Compressed with shuffle and deflate |
55 ms |
4.6 ms |
2.7 s |
Compressed datasets take longer, as their chunks must be decompressed.
Memory warning
Opening a file that would take more memory than VS Code can spare asks first. This concerns:
-
files whose segments all have a different layout: their structure grows with each segment. NI’s TDMS Defragment fixes that;
-
large files that are not on a disk, which are read whole.