[PATCH v3 7/8] kernel-shark: Use proper searching condition when the dataset is small

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If the data-set is small we do not want to have the overhead added by
the update of the progress bar. Because of this we bypass the state
switching of the FSM. However, in this case the the search condition
has to be updated by hand.

Reported-by: Slavomir Kaslev <kaslevs@xxxxxxxxxx>
Fixes: 1615b02b (kernel-shark-qt: Optimize the search in a case of a small data-set)
Signed-off-by: Yordan Karadzhov <ykaradzhov@xxxxxxxxxx>
---
 kernel-shark/src/KsTraceViewer.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/kernel-shark/src/KsTraceViewer.cpp b/kernel-shark/src/KsTraceViewer.cpp
index 4e2c93e..04a38b8 100644
--- a/kernel-shark/src/KsTraceViewer.cpp
+++ b/kernel-shark/src/KsTraceViewer.cpp
@@ -596,8 +596,11 @@ size_t KsTraceViewer::_searchItems()
 	if (_proxyModel.rowCount({}) < KS_SEARCH_SHOW_PROGRESS_MIN) {
 		/*
 		 * This is a small data-set. Do a single-threaded search
-		 * without showing the progress.
+		 * without showing the progress. We will bypass the state
+		 * switching, hence the search condition has to be updated
+		 * by hand.
 		 */
+		_searchFSM.updateCondition();
 		_proxyModel.search(column, searchText, _searchFSM.condition(), &_matchList,
 				   nullptr, nullptr);
 	} else {
-- 
2.20.1




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux