From: Marco Costalba Date: Sun, 18 Nov 2012 10:33:14 +0000 (+0100) Subject: Avoid spamming the GUI in multipv search X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=55df3fa2d7631ed67e46f9433aa7f3a71c18e5e7;hp=8367cf15da0bd8bb2cd7cc51ab4404ef6842be79 Avoid spamming the GUI in multipv search Send the PV lines to GUI only once at the end of the PV search loop or just in case of long searches. We need to sync also sending of "currmove" info to avoid sending info on current move without first informing the GUI on the PV line we are searching on. No functional change. --- diff --git a/src/search.cpp b/src/search.cpp index 4915b502..6d332c5e 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -391,7 +391,8 @@ namespace { // Sort the PV lines searched so far and update the GUI sort(RootMoves.begin(), RootMoves.begin() + PVIdx + 1); - sync_cout << uci_pv(pos, depth, alpha, beta) << sync_endl; + if (PVIdx + 1 == PVSize || Time::now() - SearchTime > 3000) + sync_cout << uci_pv(pos, depth, alpha, beta) << sync_endl; } // Do we need to pick now the sub-optimal best move ? @@ -793,7 +794,7 @@ split_point_start: // At split points actual search starts from here { Signals.firstRootMove = (moveCount == 1); - if (thisThread == Threads.main_thread() && Time::now() - SearchTime > 2000) + if (thisThread == Threads.main_thread() && Time::now() - SearchTime > 3000) sync_cout << "info depth " << depth / ONE_PLY << " currmove " << move_to_uci(move, pos.is_chess960()) << " currmovenumber " << moveCount + PVIdx << sync_endl;