Przeglądaj źródła

Limit maximum lossless refresh CPU usage

If we have plenty of bandwidth then CPU might be the limiting resource.
Unfortunately we don't have a good number for that limit, so add a
conservative hard coded value.
tags/v1.9.90
Pierre Ossman 5 lat temu
rodzic
commit
cb5a399211
1 zmienionych plików z 7 dodań i 2 usunięć
  1. 7
    2
      common/rfb/VNCSConnectionST.cxx

+ 7
- 2
common/rfb/VNCSConnectionST.cxx Wyświetl plik

@@ -1094,11 +1094,16 @@ void VNCSConnectionST::writeDataUpdate()
// afford a larger update size
nextUpdate = server->msToNextUpdate();
if (nextUpdate > 0) {
size_t maxUpdateSize;
size_t bandwidth, maxUpdateSize;

// FIXME: Bandwidth estimation without congestion control
maxUpdateSize = congestion.getBandwidth() * nextUpdate / 1000;
bandwidth = congestion.getBandwidth();

// FIXME: Hard coded value for maximum CPU throughput
if (bandwidth > 5000000)
bandwidth = 5000000;

maxUpdateSize = bandwidth * nextUpdate / 1000;
encodeManager.writeLosslessRefresh(req, server->getPixelBuffer(),
cursor, maxUpdateSize);
}

Ładowanie…
Anuluj
Zapisz