Refactored template loading to its own class for performance
[biaweb2.git] / biaweb.cpp
index 22e4121..2ed34fb 100644 (file)
@@ -36,11 +36,16 @@ int main (int argc, char *argv[]) {
 // //     else {
 // //         std::cout << "Usage: " << argv[0] << " <main tree>" << std::endl;
 
+    std::chrono::steady_clock::time_point t1 (std::chrono::steady_clock::now());
     DocumentTree tree (""); 
     tree.document_tree_builder ("Test/Reviews");
     tree.visualize_tree ();
-    tree.create_tree_html ("templates", 
-                        "Test/Out");
+    Template tpl ("templates");
+    tree.create_tree_html (&tpl, "Test/Out");
+    std::chrono::steady_clock::time_point t2 (std::chrono::steady_clock::now());
+    std::chrono::duration<double> dur (t2 - t1);
+    std::cout << dur.count () << std::endl;
+
 // //   }
 
     // Document doc;