lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [6014] Display timings for certain operations that may be


From: Greg Chicares
Subject: [lmi-commits] [6014] Display timings for certain operations that may be costly
Date: Sat, 01 Nov 2014 17:37:45 +0000

Revision: 6014
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6014
Author:   chicares
Date:     2014-11-01 17:37:43 +0000 (Sat, 01 Nov 2014)
Log Message:
-----------
Display timings for certain operations that may be costly

Modified Paths:
--------------
    lmi/trunk/ChangeLog
    lmi/trunk/census_view.cpp

Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2014-11-01 12:37:26 UTC (rev 6013)
+++ lmi/trunk/ChangeLog 2014-11-01 17:37:43 UTC (rev 6014)
@@ -34494,3 +34494,8 @@
   census_view.hpp
 Remove dead code and markers as explained 20141101T1219Z.
 
+20141101T1737Z <address@hidden> [522]
+
+  census_view.cpp
+Show busy cursor and timings for some potentially-costly operations.
+

Modified: lmi/trunk/census_view.cpp
===================================================================
--- lmi/trunk/census_view.cpp   2014-11-01 12:37:26 UTC (rev 6013)
+++ lmi/trunk/census_view.cpp   2014-11-01 17:37:43 UTC (rev 6014)
@@ -43,6 +43,7 @@
 #include "miscellany.hpp"               // is_ok_for_cctype()
 #include "path_utility.hpp"
 #include "safely_dereference_as.hpp"
+#include "timer.hpp"
 #include "wx_new.hpp"
 #include "wx_utility.hpp"               // class ClipboardEx
 
@@ -1448,6 +1449,9 @@
 
 void CensusView::UponAddCell(wxCommandEvent&)
 {
+    wxBusyCursor wait;
+    Timer timer;
+
     cell_parms().push_back(case_parms()[0]);
     list_model_->RowAppended();
 
@@ -1458,6 +1462,9 @@
     list_window_->UnselectAll();
     list_window_->Select(z);
     list_window_->EnsureVisible(z);
+
+    double total_seconds = timer.stop().elapsed_seconds();
+    status() << Timer::elapsed_msec_str(total_seconds) << std::flush;
 }
 
 void CensusView::UponDeleteCells(wxCommandEvent&)
@@ -1499,6 +1506,9 @@
         return;
         }
 
+    wxBusyCursor wait;
+    Timer timer;
+
     wxArrayInt erasures;
     typedef wxDataViewItemArray::const_iterator dvci;
     for(dvci i = selection.begin(); i != selection.end(); ++i)
@@ -1549,6 +1559,9 @@
 
     Update();
     document().Modify(true);
+
+    double total_seconds = timer.stop().elapsed_seconds();
+    status() << Timer::elapsed_msec_str(total_seconds) << std::flush;
 }
 
 /// Print tab-delimited details to file loadable in spreadsheet programs.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]