Closed Matthies closed 1 year ago
Maybe ucinewgame action takes a while? ... No, that should be handled in the isready ... readyok sequence that follows the ucinewgame and takes 1423ms.
Next idea: Flooding the engine with positions may be the reason. ... No. In the reverse game only the last position ... is sent directly before the go and we still see delay:
61485 >RubiChess 20230121(1): ucinewgame
61485 >RubiChess 20230121(1): setoption name Ponder value false
61485 >RubiChess 20230121(1): setoption name UCI_RatingAdv value -33
61485 >RubiChess 20230121(1): position startpos
61485 >RubiChess 20230121(1): isready
63309 <RubiChess 20230121(1): info string Using contempt -8
63356 <RubiChess 20230121(1): readyok
63356 >RubiChess 20230121(1): position startpos moves e2e4
63356 >RubiChess 20230121(1): position startpos moves e2e4 c7c5
63356 >RubiChess 20230121(1): position startpos moves e2e4 c7c5 g1f3
63356 >RubiChess 20230121(1): position startpos moves e2e4 c7c5 g1f3 d7d6
63356 >RubiChess 20230121(1): position startpos moves e2e4 c7c5 g1f3 d7d6 d2d4
63356 >RubiChess 20230121(1): position startpos moves e2e4 c7c5 g1f3 d7d6 d2d4 c5d4
63356 >RubiChess 20230121(1): position startpos moves e2e4 c7c5 g1f3 d7d6 d2d4 c5d4 f3d4
63356 >RubiChess 20230121(1): position startpos moves e2e4 c7c5 g1f3 d7d6 d2d4 c5d4 f3d4 g8f6
63356 >RubiChess 20230121(1): position startpos moves e2e4 c7c5 g1f3 d7d6 d2d4 c5d4 f3d4 g8f6 b1c3
63356 >RubiChess 20230121(1): position startpos moves e2e4 c7c5 g1f3 d7d6 d2d4 c5d4 f3d4 g8f6 b1c3 a7a6
63356 >RubiChess 20230121(1): position startpos moves e2e4 c7c5 g1f3 d7d6 d2d4 c5d4 f3d4 g8f6 b1c3 a7a6 h2h3
63356 >RubiChess 20230121(1): position startpos moves e2e4 c7c5 g1f3 d7d6 d2d4 c5d4 f3d4 g8f6 b1c3 a7a6 h2h3 e7e6
63356 >RubiChess 20230121(1): position startpos moves e2e4 c7c5 g1f3 d7d6 d2d4 c5d4 f3d4 g8f6 b1c3 a7a6 h2h3 e7e6 g2g4
63356 >RubiChess 20230121(1): position startpos moves e2e4 c7c5 g1f3 d7d6 d2d4 c5d4 f3d4 g8f6 b1c3 a7a6 h2h3 e7e6 g2g4 f8e7
63356 >RubiChess 20230121(1): position startpos moves e2e4 c7c5 g1f3 d7d6 d2d4 c5d4 f3d4 g8f6 b1c3 a7a6 h2h3 e7e6 g2g4 f8e7 c1e3
63356 >RubiChess 20230121(1): position startpos moves e2e4 c7c5 g1f3 d7d6 d2d4 c5d4 f3d4 g8f6 b1c3 a7a6 h2h3 e7e6 g2g4 f8e7 c1e3 b8c6
65487 >RubiChess 20230121(1): position startpos moves e2e4 c7c5 g1f3 d7d6 d2d4 c5d4 f3d4 g8f6 b1c3 a7a6 h2h3 e7e6 g2g4 f8e7 c1e3 b8c6 g4g5
65487 >RubiChess 20230121(1): go wtime 35997715 btime 1800000 winc 1 binc 3000
65533 <RubiChess 20230121(1): info depth 1 seldepth 2 multipv 1 time 0 score cp -118 nodes 230 nps 0 tbhits 0 hashfull 0 pv f6d7
startSearchTime() which fixes the starting time is called immediately after the "go" is seen and even before threads are started etc. so if starting > 100 threads takes some time, the engine should see this and would not give ... time 0 ... on first depth.
Every 'position ... ' triggers a prepareThreads() which moves quite an amount of data for every thread. So maybe it is the flooding of position that causes the delay. Needs more logs to investigate...
So from cutechess pov it takes 712ms from go to first output. From RubiChess pov this is a GUI lag.