newsAdvanced Gtk+ Sequencer - News: Constant CPU consumption by bisection

Latest News
GSequencer version 3.10.5 released posted by jkraehemann, Sun 29 Aug 2021 07:41:14 AM UTC - 0 replies
implement VST3 C API Wrapper posted by jkraehemann, Tue 10 Aug 2021 12:53:03 PM UTC - 0 replies
refactored utility functions posted by jkraehemann, Tue 03 Aug 2021 06:26:38 AM UTC - 0 replies
GSequencer version 3.9.1 released posted by jkraehemann, Wed 30 Jun 2021 06:07:07 AM UTC - 0 replies
preparation for migration to Gtk4 posted by jkraehemann, Thu 18 Feb 2021 10:38:40 AM UTC - 0 replies
[Submit News]
[103 news in archive]

Constant CPU consumption by bisection

Item posted by Joël Krähemann <jkraehemann> on Tue 05 Feb 2019 05:12:51 PM UTC.

For short, I am just refactoring some parts of:

  • AgsNotation
  • AgsAutomation
  • AgsWave

to do bisection x-offset. This shall result in better performance and more constant CPU consumption.

Prior, I recognized as doing low-latency playback using AgsWave, to encounter bottlenecks. This was solved by refactoring:


This function does bisection as of Advanced Gtk+ Sequencer version 2.1.38.

The refactoring

I just implemented:


... returning a GList containing all x-offset matching AgsNote objects. It uses bisection to find matches.

Another refactored function is:


So guess, it does bisection, now.

Bisection segments

For now, I work on refactoring:


Doing bisection segments is going to provide enormous performance payback as doing continues playback/recording. Because the algorithm looks at the first, last and center element.

Especially recording benefits of this, since the last segment is lookup very fast.

Since all these functions involve mutexes, the lock count is more constant and is slightly reduced during playback.

by Joël

No messages in Constant CPU consumption by bisection


Back to the top

Powered by Savane 3.7