summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-01-09 16:15:01 +0000
committerCarl Hetherington <cth@carlh.net>2014-01-09 16:15:01 +0000
commitb7cedf45ed8de32fc9384d5bc18dfcdc3376111c (patch)
tree7ad955a0b9c0a783eb922f4ccca00c8e3419541a
parentc2e2b2bace98d1ad297c7351a907ed7713fa1850 (diff)
Bump maximum number of frames in memory for high thread counts. Make sure that we push later frames to disk where necessary rather than earlier ones.
-rw-r--r--ChangeLog4
-rw-r--r--src/lib/writer.cc5
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1ec58c989..3272a0d34 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-01-09 Carl Hetherington <cth@carlh.net>
+
+ * More fixes for slow-downs on fast computers.
+
2014-01-08 Carl Hetherington <cth@carlh.net>
* Version 1.59 released.
diff --git a/src/lib/writer.cc b/src/lib/writer.cc
index 8d9b5855e..21274cb83 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -48,7 +48,7 @@ using std::cout;
using boost::shared_ptr;
using boost::weak_ptr;
-int const Writer::_maximum_frames_in_memory = 8;
+int const Writer::_maximum_frames_in_memory = Config::num_local_encoding_threads() + 4;
Writer::Writer (shared_ptr<const Film> f, weak_ptr<Job> j)
: _film (f)
@@ -291,7 +291,8 @@ try
Write some FULL frames to disk.
*/
- /* Find one */
+ /* Find one from the back of the queue */
+ _queue.sort ();
list<QueueItem>::reverse_iterator i = _queue.rbegin ();
while (i != _queue.rend() && (i->type != QueueItem::FULL || !i->encoded)) {
++i;