Speed up silence-stripping when there are many silent chunks
Previously every region fragment was added one at a time, with each emitting signals and updating the GUI. If there are a few thousand regions Ardour can freeze for a significant amount of time. There is still the issue that the GUI freezes after the progress-bar reached the end: consolidate overlapping ranges after analysis, then add regions. And Playlist::flush_notifications still emits RegionFactory::CheckNewRegion() for every region individually and RegionListBase::add_region becomes the bottleneck. But at least adding 7k regions now returns in under 5 minutes instead of taking over an hour.
This commit is contained in:
parent
4965c83ef3
commit
9cac17ea7d
@ -6131,6 +6131,7 @@ Editor::apply_filter (Filter& filter, string command, ProgressReporter* progress
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
playlist->freeze ();
|
||||||
std::vector<boost::shared_ptr<Region> >::iterator res = filter.results.begin ();
|
std::vector<boost::shared_ptr<Region> >::iterator res = filter.results.begin ();
|
||||||
|
|
||||||
/* first region replaces the old one */
|
/* first region replaces the old one */
|
||||||
@ -6142,6 +6143,7 @@ Editor::apply_filter (Filter& filter, string command, ProgressReporter* progress
|
|||||||
playlist->add_region (*res, (*res)->position());
|
playlist->add_region (*res, (*res)->position());
|
||||||
++res;
|
++res;
|
||||||
}
|
}
|
||||||
|
playlist->thaw ();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user