[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master a860103 2/3: Revert "Experimentally Reconcile
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master a860103 2/3: Revert "Experimentally Reconcile() census files from external sources" |
Date: |
Tue, 20 Mar 2018 13:25:59 -0400 (EDT) |
branch: master
commit a860103ddf16886642ace7ebc3720815da9bb23d
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Revert "Experimentally Reconcile() census files from external sources"
This reverts commit 8465685adf16dfa032a60f1612b654e66daff34c.
As the commit message noted:
| This patch is intended to be reverted. If calling Reconcile() is a
| good idea, there's a better way to call it, as documented inline.
---
multiple_cell_document.cpp | 60 ----------------------------------------------
1 file changed, 60 deletions(-)
diff --git a/multiple_cell_document.cpp b/multiple_cell_document.cpp
index 6f7d063..a154214 100644
--- a/multiple_cell_document.cpp
+++ b/multiple_cell_document.cpp
@@ -25,10 +25,7 @@
#include "alert.hpp"
#include "assert_lmi.hpp"
-#include "contains.hpp"
#include "data_directory.hpp" // AddDataDir()
-#include "global_settings.hpp"
-#include "timer.hpp"
#include "value_cast.hpp"
#include "xml_lmi.hpp"
@@ -147,19 +144,10 @@ void multiple_cell_document::parse(xml_lmi::dom_parser
const& parser)
alarum() << "Incompatible file version." << LMI_FLUSH;
}
- Timer timer;
- double seconds_for_validation {0.0};
- double seconds_for_reading {0.0};
- double seconds_for_reconciliation {0.0};
- double seconds_for_reconciliation2 {0.0};
-
if(data_source_is_external(parser.document()))
{
- status() << "Validating..." << std::flush;
validate_with_xsd_schema(parser.document(),
xsd_schema_name(file_version));
}
- seconds_for_validation = timer.stop().elapsed_seconds();
- timer.restart();
case_parms_ .clear();
class_parms_.clear();
@@ -187,54 +175,6 @@ void multiple_cell_document::parse(xml_lmi::dom_parser
const& parser)
}
assert_vector_sizes_are_sane();
-
- global_settings const& g = global_settings::instance();
- if(contains(g.pyx(), "skip_reconciliation"))
- {
- return;
- }
-
- seconds_for_reading = timer.stop().elapsed_seconds();
- timer.restart();
-
- // This is structured to measure the three steps separately. If
- // the Reconcile() step here is to be kept, it should be merged
- // into the preceding loop.
- if(data_source_is_external(parser.document()))
- {
- int c = 0;
- status() << "Reconciling..." << std::flush;
- for(auto& j : case_parms_ ) {j.Reconcile(); status() << ++c <<
std::flush;}
- for(auto& j : cell_parms_ ) {j.Reconcile(); status() << ++c <<
std::flush;}
- for(auto& j : class_parms_) {j.Reconcile(); status() << ++c <<
std::flush;}
- status() << "Reconciled." << std::flush;
- }
- seconds_for_reconciliation = timer.stop().elapsed_seconds();
- // Repeat to see whether the second time is faster.
- timer.restart();
- if(data_source_is_external(parser.document()))
- {
- int c = 0;
- status() << "Reconciling..." << std::flush;
- for(auto& j : case_parms_ ) {j.Reconcile(); status() << ++c <<
std::flush;}
- for(auto& j : cell_parms_ ) {j.Reconcile(); status() << ++c <<
std::flush;}
- for(auto& j : class_parms_) {j.Reconcile(); status() << ++c <<
std::flush;}
- status() << "Reconciled." << std::flush;
- }
- seconds_for_reconciliation2 = timer.stop().elapsed_seconds();
-
- status()
- << "Read " << counter << " cells"
- << "; validation: "
- << Timer::elapsed_msec_str(seconds_for_validation)
- << "; reading: "
- << Timer::elapsed_msec_str(seconds_for_reading)
- << "; reconciliation: "
- << Timer::elapsed_msec_str(seconds_for_reconciliation)
- << "; repeat: "
- << Timer::elapsed_msec_str(seconds_for_reconciliation2)
- << std::flush
- ;
}
/// Parse obsolete version 0 xml (for backward compatibility).