Details
-
Suggestion
-
Resolution: Invalid
-
Not Evaluated
-
None
-
1.2.x
-
None
Description
BindingManager destroctor is very slowly. (shiboken/libshiboken/bindingmanager.cpp Line #159)
In my application, the static BindingManager is destroyed when exit the application, which make the exit take long time.
The root cause is: WrapperMap::begin() is O.
Proposer solution:
Rewrite the code as:
if (Py_IsInitialized()) { // ensure the interpreter is still valid
WrapperMap::iterator it = m_d->wrapperMapper.begin();
for (; it != m_d->wrapperMapper.end(); ++it)
assert(m_d->wrapperMapper.size() == 0);
}
Or make WrapperMap::begin() to O(1).