Mercurial > hg > svcore
diff base/EventSeries.h @ 1618:ba3ddb7fe2bd single-point
Performance notes
author | Chris Cannam |
---|---|
date | Fri, 08 Mar 2019 11:54:35 +0000 |
parents | bdc19a09a1f9 |
children | f594fd249473 |
line wrap: on
line diff
--- a/base/EventSeries.h Fri Mar 08 11:15:59 2019 +0000 +++ b/base/EventSeries.h Fri Mar 08 11:54:35 2019 +0000 @@ -32,6 +32,13 @@ * starts or ends) associated with a set of the events that are active * at or from that position. These are updated when an event is added * or removed. + * + * Performance is highly dependent on the extent of overlapping events + * and the order in which events are added. Each event (with duration) + * that is added requires updating all the seams within the extent of + * that event, taking a number of ordered-set updates proportional to + * the number of events already existing within its extent. Add events + * in order of start frame if possible. */ class EventSeries { @@ -348,15 +355,15 @@ #ifdef DEBUG_EVENT_SERIES void dumpEvents() const { - std::cerr << "EVENTS [" << std::endl; + std::cerr << "EVENTS (" << m_events.size() << ") [" << std::endl; for (const auto &i: m_events) { - std::cerr << i.first.toXmlString(" "); + std::cerr << " " << i.second << "x " << i.first.toXmlString(); } std::cerr << "]" << std::endl; } void dumpSeams() const { - std::cerr << "SEAMS [" << std::endl; + std::cerr << "SEAMS (" << m_seams.size() << ") [" << std::endl; for (const auto &s: m_seams) { std::cerr << " " << s.first << " -> {" << std::endl; for (const auto &p: s.second) {