From 1eef972c86f40302b97eeb68ee5bd4c59be14371 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Fri, 19 Oct 2001 00:13:23 +0000 Subject: [PATCH] Profiling code svn: r486 --- gramps/src/ReadXML.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/gramps/src/ReadXML.py b/gramps/src/ReadXML.py index 64a5a25ff..73d1f63c2 100644 --- a/gramps/src/ReadXML.py +++ b/gramps/src/ReadXML.py @@ -232,16 +232,12 @@ def loadRevision(database, file, filename, revision, callback=None): if __name__ == "__main__": import profile - import cPickle database = RelDataBase() t1 = time.time() - #profile.run('loadData(database, sys.argv[1])') - loadData(database,sys.argv[1]) + if len(sys.argv) > 2: + profile.run('loadData(database, sys.argv[1])') + else: + loadData(database,sys.argv[1]) t2 = time.time() print t2-t1 - f = gzip.open("autosave","w") - p = cPickle.dump(database,f) - f.close() - t3 = time.time() - print t3-t2