Revision 88b3a2d...
Go back to digest for 28th April 2013Optimization in Utilities
Aleix Pol Gonzalez committed changes in [muon] /:
Optimize proxy filtering and search
Right now we were calling ResourcesModel::data() for every call when
filtering, now we fetch the resource and we operate on it.
Also when searching fetch QList<AbstractResource*> instead of a list of
package names. This is better because resource pointers are faster to deal
with: no need to see if it matches, comparison is faster too.
This leads to a ~50% optimization while searching (added QTimers to
ResourcesProxyModel::search()).
File Changes
Modified 11 files
- libmuon/resources/AbstractResourcesBackend.h
- libmuon/resources/ResourcesProxyModel.cpp
- libmuon/resources/ResourcesProxyModel.h
- libmuon/backends/ApplicationBackend/ApplicationBackend.cpp
- libmuon/backends/ApplicationBackend/ApplicationBackend.h
- libmuon/backends/BodegaBackend/BodegaBackend.cpp
- libmuon/backends/BodegaBackend/BodegaBackend.h
- libmuon/backends/DummyBackend/DummyBackend.cpp
- libmuon/backends/DummyBackend/DummyBackend.h
- libmuon/backends/KNSBackend/KNSBackend.cpp
- libmuon/backends/KNSBackend/KNSBackend.h
11 files changed in total