13
0
livetrax/libs/evoral/libsmf
Robin Gareus cd53301d06
Significantly speed up loading SMF tempo-maps
Files that have many tracks, each with tempo information
were near impossible to load (30+ mins on modern 4.2Ghz CPU!),
because tempo is parsed incrementally:

```
For each new track:
  for each new tempo-event:
    rewind()
    for each loaded track so far:
      for each event on this track so far
```

This reduces the complexity from O(tracks^2 * tempos^2)
to O(tracks * tempos).

"Come Thou Fount Tempo Map.mid" has 238 Tracks and 56168 total
Tempo Changes (236 per track). This now requires only 56168 iterations
in smf_create_tempo_map_and_compute_seconds, rather than 1.64e+9
iterations
2022-02-05 17:33:21 +01:00
..
COPYING
README
smf_decode.c
smf_load.c Significantly speed up loading SMF tempo-maps 2022-02-05 17:33:21 +01:00
smf_private.h
smf_save.c
smf_tempo.c
smf.c Significantly speed up loading SMF tempo-maps 2022-02-05 17:33:21 +01:00
smf.h Significantly speed up loading SMF tempo-maps 2022-02-05 17:33:21 +01:00
smfsh.c

This is a stripped down version of libsmf 1.2 by Edward Tomasz Napiera
for internal use by Evoral.  See COPYING for licensing information.

The complete version can be found at <http://libsmf.sf.net>.