dbshelve len should not be called
43 function calls in 183.099 CPU seconds
Ordered by: internal time, call count
List reduced from 27 to 20 due to restriction <20>
ncalls tottime percall cumtime percall filename:lineno(function)
1 183.098 183.098 183.098 183.098 dbshelve.py:116(__len__)
11 0.001 0.000 0.001 0.000 lockeddbshelve.py:154(close)
1 0.000 0.000 0.000 0.000 util.py:169(xterm_title)
1 0.000 0.000 183.099 183.099 api.py:126(finalize)
7 0.000 0.000 0.000 0.000 itembyrepodb.py:41(close)
This commit is contained in:
@@ -194,7 +194,7 @@ componentdb = None
|
|||||||
|
|
||||||
def init():
|
def init():
|
||||||
global componentdb
|
global componentdb
|
||||||
if componentdb:
|
if componentdb is not None:
|
||||||
return componentdb
|
return componentdb
|
||||||
|
|
||||||
componentdb = ComponentDB()
|
componentdb = ComponentDB()
|
||||||
@@ -202,6 +202,6 @@ def init():
|
|||||||
|
|
||||||
def finalize():
|
def finalize():
|
||||||
global componentdb
|
global componentdb
|
||||||
if componentdb:
|
if componentdb is not None:
|
||||||
componentdb.close()
|
componentdb.close()
|
||||||
componentdb = None
|
componentdb = None
|
||||||
|
|||||||
+2
-2
@@ -76,7 +76,7 @@ filesdb = None
|
|||||||
|
|
||||||
def init():
|
def init():
|
||||||
global filesdb
|
global filesdb
|
||||||
if filesdb:
|
if filesdb is not None:
|
||||||
return filesdb
|
return filesdb
|
||||||
|
|
||||||
filesdb = FilesDB()
|
filesdb = FilesDB()
|
||||||
@@ -84,6 +84,6 @@ def init():
|
|||||||
|
|
||||||
def finalize():
|
def finalize():
|
||||||
global filesdb
|
global filesdb
|
||||||
if filesdb:
|
if filesdb is not None:
|
||||||
filesdb.close()
|
filesdb.close()
|
||||||
filesdb = None
|
filesdb = None
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ db = None
|
|||||||
|
|
||||||
def init():
|
def init():
|
||||||
global db
|
global db
|
||||||
if db:
|
if db is not None:
|
||||||
return db
|
return db
|
||||||
|
|
||||||
db = InstallDB()
|
db = InstallDB()
|
||||||
@@ -205,6 +205,6 @@ def init():
|
|||||||
|
|
||||||
def finalize():
|
def finalize():
|
||||||
global db
|
global db
|
||||||
if db:
|
if db is not None:
|
||||||
db.close()
|
db.close()
|
||||||
db = None
|
db = None
|
||||||
|
|||||||
@@ -183,11 +183,16 @@ pkgdb = None
|
|||||||
|
|
||||||
def init():
|
def init():
|
||||||
global pkgdb
|
global pkgdb
|
||||||
|
|
||||||
|
if pkgdb is not None:
|
||||||
|
return pkgdb
|
||||||
|
|
||||||
pkgdb = PackageDB()
|
pkgdb = PackageDB()
|
||||||
return pkgdb
|
return pkgdb
|
||||||
|
|
||||||
def finalize():
|
def finalize():
|
||||||
global pkgdb
|
global pkgdb
|
||||||
if pkgdb:
|
|
||||||
|
if pkgdb is not None:
|
||||||
pkgdb.close()
|
pkgdb.close()
|
||||||
pkgdb = None
|
pkgdb = None
|
||||||
|
|||||||
+2
-2
@@ -110,7 +110,7 @@ db = None
|
|||||||
def init():
|
def init():
|
||||||
global db
|
global db
|
||||||
|
|
||||||
if db:
|
if db is not None:
|
||||||
return db
|
return db
|
||||||
|
|
||||||
db = RepoDB()
|
db = RepoDB()
|
||||||
@@ -119,6 +119,6 @@ def init():
|
|||||||
def finalize():
|
def finalize():
|
||||||
global db
|
global db
|
||||||
|
|
||||||
if db:
|
if db is not None:
|
||||||
db.close()
|
db.close()
|
||||||
db = None
|
db = None
|
||||||
|
|||||||
+2
-2
@@ -93,7 +93,7 @@ srcdb = None
|
|||||||
|
|
||||||
def init():
|
def init():
|
||||||
global srcdb
|
global srcdb
|
||||||
if srcdb:
|
if srcdb is not None:
|
||||||
return srcdb
|
return srcdb
|
||||||
|
|
||||||
srcdb = SourceDB()
|
srcdb = SourceDB()
|
||||||
@@ -101,6 +101,6 @@ def init():
|
|||||||
|
|
||||||
def finalize():
|
def finalize():
|
||||||
global srcdb
|
global srcdb
|
||||||
if srcdb:
|
if srcdb is not None:
|
||||||
srcdb.close()
|
srcdb.close()
|
||||||
srcdb = None
|
srcdb = None
|
||||||
|
|||||||
Reference in New Issue
Block a user