Change project directory structure according to application structure.
Change 'nox' configuration option to something more meaningful 'nogui'.
Rename 'Icons' folder to 'icons' (similar to other folders).
Partially add 'nowebui' option support.
Remove QConf project file.
Since e907306b41 ("Right align header text that also has right-aligned
row text"), right-aligned elements are no longer centered vertically.
This can be noticed with some Qt styles (e.g. Breeze).
Torrent numbers were recalculated on every dataChanged() signal. The previous commit
greatly increases the number of dataChanged() signals.
HEAD^^:
Total wall clock: 97.069s
updateTorrentNumbers() time: 0.033s
HEAD^:
Total wall clock: 96.132s
updateTorrentNumbers() time: 0.179s
HEAD:
Total wall clock: 95.535s
updateTorrentNumbers() time: 0.047s
After this commit the time of updateTorrentNumbers() is (almost) back to
the level that it was in HEAD^^.
In commit b50d733 TorrentModel moved from a periodic refresh, to using
postStatusUpdate(). In this transition I forgot to remove emition of
dataChanged() signal for the entire table.
According to my measurements this commit reduce CPU usage of qbittorrent
by a factor of 3:
Before:
Total wall clock: 97.07s
CPU time: 21.77s
- Time spent in TransferListDelegate::paint(): 14.60s
- Time spent in TorrentModel::forceModelRefresh(): 1.44s
- Time spent in TorrentModel::stateUpdated(): 0.02s
After:
Total wall clock: 96.13s
CPU time: 6.68s
- Time spent in TransferListDelegate::paint(): 2.63s
- Time spent in TorrentModel::forceModelRefresh(): <0.01s
- Time spent in TorrentModel::stateUpdated(): 1.73s
As it is seen the time spent in painting is reduced by a factor of 6 (14.60->2.63) at
the cost of slightly increased time of notifications that model is
changed (1.44->1.73). The next commits attempt to address this issue.
Qt uses binary search to convert string to QColor, we don't need that
binary search at all. This patch could be considered as optimization, but
in reality creating QColor takes only 0.2% of time. So it should be visible
at all.
This could be considered as cleanup for not calling expensive functions
from non-expensive ones.
libtorrent has a relatively heavy headers, that take lots of time to
process. This commit removes unnecessary includes of libtorrent headers
and replaces them with forward declarations.
I had to move some functions in QBtSession from slots to regular
functions because moc'ed file want to see complete types of all
parameters of slots.
"time make" of full rebuild before this series of commits:
real 13m35.937s
user 12m1.295s
sys 1m25.908s
after:
real 10m54.390s
user 9m31.167s
sys 1m12.580s