[Mumps2Py:] [140] cut down on console feedback ( performance drag with large files with thousands of routines) when analyzing tokens. |
[ Thread Index |
Date Index
| More lists.mumps2py.org/discuss Archives
]
Revision: 140
Author: pgallot
Date: 2008-02-28 20:33:51 +0000 (Thu, 28 Feb 2008)
Log Message:
-----------
cut down on console feedback (performance drag with large files with thousands of routines) when analyzing tokens.
Modified Paths:
--------------
trunk/mumps2py_ui.pyw
Modified: trunk/mumps2py_ui.pyw
===================================================================
--- trunk/mumps2py_ui.pyw 2008-02-28 20:27:14 UTC (rev 139)
+++ trunk/mumps2py_ui.pyw 2008-02-28 20:33:51 UTC (rev 140)
@@ -342,7 +342,8 @@
input_file = fileinput.input(modules_list[0].input_file)
tstart = time.time()
for modcnt, the_module in enumerate(modules_list):
- print the_module.mod_name
+ if modcnt % 20 == 0: # cut down on console feedback
+ print the_module.mod_name
if the_module.tokenlist_isempty():
mumps2py.parseMumps(the_module, input_file)
for token in the_module.tokenized():
@@ -350,6 +351,8 @@
the_module.empty_tokenlist() # keep memory usage down
except mumps2py.ParseError, err:
self.message(err.error_msg())
+ except KeyboardInterrupt:
+ self.message("Interrupt while parsing " + the_module.mod_name)
finally:
print time.time() - tstart, "seconds to parse %d routines" % \
modcnt