Files
ardour/libs
Robin Gareus 6ac8ee41af Collect Playlist::ContentsChanged() signals #8626
With a large session:

Editor::insert_time()
 -> Playlist::shift()
 -> 4000+ regions are modified
 -> 4k calls to Region::send_change()
 -> --"-- Playlist::region_changed ()
 -> --"-- Playlist::region_bounds_changed ()
 -> --"-- Playlist::notify_contents_changed ()
 -> --"-- ContentsChanged () /* EMIT SIGNAL */
 -> --"-- DiskReader::playlist_modified ()
 -> 4k Session::request_overwrite_buffer events are queued

The butler thread processes them all in the background, but
this also enqueues 4k+ events to the GUI event pool since the
GUI subscribed to Playlist::ContentsChanged ().

However the GUI is inside Editor::insert_time() and cannot handle
events. So they keep accumulating, and eventually hits
"POOL OUT OF MEMORY - RECOMPILE WITH LARGER SIZE!"

-=-
This fixes the issue by collecting blocking ::notify_contents_changed
until all region_changed() events are processed, and a single call
to Playlist::flush_notifications() notifies the UI and disk-reader.
2021-03-21 22:45:57 +01:00
..
2020-12-01 12:08:09 +01:00
2021-01-23 23:43:14 +01:00
2021-03-21 22:31:40 +01:00
2021-02-12 14:19:17 +01:00
2020-01-22 02:00:25 +01:00
2021-02-28 20:01:06 +01:00
2021-03-01 22:14:38 +01:00