Menu

Pipeline Batching

An important new feature is batch install is coming to the Install Pipeline.

This is incredibly handy during the startup/loading phase of the engine, where you are typically bombarding the Install Pipeline with GO install requests.

There are some problems with this, in particular the stress put on the Blocking Queue that transfers the messages, and the Update Lock that coordinates AGE with the GL thread.

With batch install both problems are handled. In addition, the Update Lock is only taken once for the entire batch of GOs, so throughput is much higher on the "receiving" end of the pipeline. You can also think of a batch install like a transaction, because no other messages will interleave with the pipeline's processing of the batch.

The savings and improvement is satisfying: our "board" game has an 80-by-25 tile grid. That's 2000 install pipeline messages! The first try failed; this clogged everything up and deadlocked the GameCycle thread. Next try was a "paced" install by rows; this worked much better at only 81 (80 + "done") install pipeline messages at one "shot", but again the resulting message count is 2025 for the entire board.

Taking that and moving to batch install is now only 2 install pipeline messages (1[80] + "done") per row, and the loading sequence is now much faster, with a total message count of 81!

We will also implement batch event to the Event Pipeline, to enhance the ability to send multiple events out as a transaction and head off any possible event interleave issues. Interleave can be an issue when you have GO methods that generate Pipeline messages. These methods are easy to spot; they contain the Pipelines interface in their signature.

Posted by g-dollar 2015-01-15

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.