Skip to content

Improve writing when streaming multiple chunks #244

Open
@adamreeve

Description

@adamreeve

The TDMS file writing support in npTDMS is currently fairly simple, for every segment we always write a new object list and full raw data index for every channel. When streaming chunks of data to disk it would be nice to make use of the TDMS format features that allow reusing previous metadata to reduce file size and improve the efficiency when reading files. Some things to consider:

  • Use the 0x00000000 raw data index header when a raw data index matches the previous index
  • Don't write the segment lead in and metadata at all if none of the objects and raw data indexes have changed, just write multiple raw data chunks contiguously
  • Track property values and don't rewrite properties if they haven't changed from previous segments. Users can control which properties are written per segment and ideally would only write properties once, but it probably makes sense for npTDMS to avoid writing duplicate properties unnecessarily.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions