mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 19:08:26 -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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user