1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 11:08:02 -06:00

Windows: reduce WNetGetConnection performance impact by making calls every 1 minute instead of every 2 seconds. This should be enough since the list of mapped network drive will not change so often.

This commit is contained in:
Mounir IDRASSI
2017-06-10 01:01:54 +02:00
parent 0daf255a19
commit e14cf93d92

View File

@@ -7154,8 +7154,8 @@ DWORD GetUsedLogicalDrives (void)
finally_do ({ LeaveCriticalSection (&csWNetCalls); });
/* update values every 2 seconds to reduce CPU consumption */
if ((time (NULL) - g_lastCallTime) > 2)
/* update values every 1 minute to reduce CPU consumption */
if ((time (NULL) - g_lastCallTime) > 60)
{
/* detect disconnected mapped network shares and removed
* their associated drives from the list