Slightly optimize Workspace::xStackingOrder
Callgrind analysis showed that this method has room for improvement. The bottle neck is mapping the Unmanaged against the list of windows retreived from xcb_query_tree. The number of windows in that list is rather large (>1000), which turns the loop into an expensive path. Workspace::findUnmanaged seems to be too expensive for that due to the overhead of using a functor and multiple method calls. The Inl. cost before the optimization for checking ~55,000 windows is 2.46. The change uses a good old const-iterator based loop over the unmanaged list to check for the window. This reduces the Incl. cost for checking ~55,000 windows to 0.28. REVIEW: 122067
parent
f643b719
Please register or sign in to comment