From 00945e5749eb939285177d3c40651dfe599d640f Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 26 Aug 2012 20:59:51 +0300 Subject: [PATCH] Stop updating file priorities regularly in torrent content panel Performance improvement to address issue #24. --- src/properties/propertieswidget.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/properties/propertieswidget.cpp b/src/properties/propertieswidget.cpp index e203396c5..5dc8f740a 100644 --- a/src/properties/propertieswidget.cpp +++ b/src/properties/propertieswidget.cpp @@ -259,6 +259,8 @@ void PropertiesWidget::loadTorrentInfos(const QTorrentHandle& _h) // List files in torrent PropListModel->model()->setupModelData(h.get_torrent_info()); filesList->setExpanded(PropListModel->index(0, 0), true); + // Load file priorities + PropListModel->model()->updateFilesPriorities(h.file_priorities()); } } catch(const invalid_handle& e) { } // Load dynamic data @@ -388,8 +390,11 @@ void PropertiesWidget::loadDynamicData() { filesList->setUpdatesEnabled(false); std::vector fp; h.file_progress(fp); - PropListModel->model()->updateFilesPriorities(h.file_priorities()); PropListModel->model()->updateFilesProgress(fp); + // XXX: We don't update file priorities regularly for performance + // reasons. This means that priorities will not be updated if + // set from the Web UI. + // PropListModel->model()->updateFilesPriorities(h.file_priorities()); filesList->setUpdatesEnabled(true); } }