]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/mathml_editor/test/editor.cc
* added timer for profiling the editor
[helm.git] / helm / DEVEL / mathml_editor / test / editor.cc
index 6723debb3872ca04a2bc142d51cedb8e1e7ca501..cfb0ade29df133ece954dca328a30131a247e2e8 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "dom.hh"
 #include "TPushParser.hh"
+#include "timer.hh"
 
 #include "ILPushLexer.hh"
 #include "TDictionary.hh"
@@ -69,7 +70,7 @@ edit_output_tex(Context* data)
   DOM::Node c = res.get_firstChild();
   if (c) std::cout << "HEY, there is a child! " << c.get_nodeName() << " " << c.get_nodeValue() << std::endl;
 #endif
-  data->texStyle.save(res, stdout);
+  //data->texStyle.save(res, stdout);
 }
 
 extern "C" int
@@ -86,10 +87,13 @@ extern "C" void
 edit_push_char(Context* context, gchar ch)
 {
   assert(context != NULL);
+  long t0 = getTimer();
   GUI_freeze();
   std::cout << "*** SENDING " << ch << std::endl;
   context->lexer.push(ch);
   GUI_thaw();
+  long t1 = getTimer();
+  std::cout << "=== OVERALL TIME = " << (t1 - t0) / 1000 << std::endl;
 }
 
 #include <unistd.h>