Closed AlexHausauer closed 3 years ago
Hmm, that's weird. Is that happens after download only (OK using cache)? What network engine you use? What happens if you try another one?
Yes, this happens as soon as the tile is downloaded via the Internet, and then it constantly loads the processor by 80%. But the problem was solved. During the loading of the tile, threads are created (I have 2 of them) and after the download is complete they will not end, but continue to work in an infinite loop. Added a delay of 10 ms to the TNetworkRequestThread.Execute procedure and the problem was solved. Now the processor load is 0% in idle mode.
procedure TNetworkRequestThread.Execute; var ... begin ... while not Terminated do begin pT := PTile(FOwner.PopTask); if pT <> nil then begin ... end else sleep(10); end; end;
Hmm, thanks for investigation, looks like improper thread finalization. I'll look into it
Fixed at last!
What could be the reason for a constant processor load of up to 80%, after downloading a tile from the Internet?