From 9535121c1ef2e8ee2568546715aaa55feae15bdc Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Thu, 5 Mar 2009 10:08:25 -0500 Subject: [PATCH] Performance - Removed the unnecessary sort in the 'completed' report. The tasks are already sorted. --- src/report.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/report.cpp b/src/report.cpp index f1e806fde..d2bb6e1e2 100644 --- a/src/report.cpp +++ b/src/report.cpp @@ -189,7 +189,10 @@ std::string handleCompleted (TDB& tdb, T& task, Config& conf) table.setColumnJustification (1, Table::left); table.setColumnJustification (2, Table::left); - table.sortOn (0, Table::ascendingDate); + // Note: There is deliberately no sorting. The original sorting was on the + // end date. Tasks are appended to completed.data naturally sorted by + // the end date, so that sequence is assumed to remain unchanged, and + // relied upon here. // Iterate over each task, and apply selection criteria. for (unsigned int i = 0; i < tasks.size (); ++i)