beacon-biosignals / EDF.jl

Read and write EDF files in Julia
MIT License
18 stars 5 forks source link

Support header-only file loading #26

Closed OTDE closed 4 years ago

OTDE commented 4 years ago

This PR lets a user open a version of their EDF file with only header information. Documentation will be adjusted in further commits to reflect this.

Performance is not affected by these changes:

previous:

julia> @benchmark EDF.read("test/data/test.edf")
BenchmarkTools.Trial: 
  memory estimate:  3.33 MiB
  allocs estimate:  6819
  --------------
  minimum time:     884.232 μs (0.00% GC)
  median time:      913.414 μs (0.00% GC)
  mean time:        1.014 ms (8.20% GC)
  maximum time:     2.654 ms (54.53% GC)
  --------------
  samples:          4924
  evals/sample:     1

current (this PR):

julia> @benchmark EDF.read("test/data/test.edf")
BenchmarkTools.Trial: 
  memory estimate:  3.32 MiB
  allocs estimate:  6814
  --------------
  minimum time:     863.867 μs (0.00% GC)
  median time:      893.672 μs (0.00% GC)
  mean time:        1.003 ms (8.20% GC)
  maximum time:     3.108 ms (41.48% GC)
  --------------
  samples:          4976
  evals/sample:     1

Solves a couple issues: #25 and #9

OTDE commented 4 years ago

Thanks for y'all's patience with my CI inexperience! Let me know if anything else needs adjusting.

OTDE commented 4 years ago

Feedback addressed in https://github.com/beacon-biosignals/EDF.jl/pull/26/commits/9f33069b19b7deb7fdd1da4e8fc92eafb4962f6c !