Perf: Optimize ProjectItemDataProvider::itemCount()

Authored by kfunk on Jan 9 2017, 10:29 PM.

Description

Perf: Optimize ProjectItemDataProvider::itemCount()

A callgrind run showed that ProjectItemDataProvider::itemCount() is called a lot of
times when quick open is opened, but the function itself causes massive re-computation of
known values each time it is invoked.

This patches fixes this, implementing a cache for the total item count
of the data provider.

Testing: After a second callgrind run
ProjectItemDataProvider::itemCount() no longer showed up as an expensive
function.

Details

Committed
kfunkJan 10 2017, 4:35 PM
Differential Revision
D4056: Perf: Optimize ProjectItemDataProvider::itemCount()
Parents
R32:2b44ef9f6ae9: quickopen: Show default icon in action provider
Branches
Unknown
Tags
Unknown