mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-01-04 04:38:12 -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); });
|
finally_do ({ LeaveCriticalSection (&csWNetCalls); });
|
||||||
|
|
||||||
/* update values every 2 seconds to reduce CPU consumption */
|
/* update values every 1 minute to reduce CPU consumption */
|
||||||
if ((time (NULL) - g_lastCallTime) > 2)
|
if ((time (NULL) - g_lastCallTime) > 60)
|
||||||
{
|
{
|
||||||
/* detect disconnected mapped network shares and removed
|
/* detect disconnected mapped network shares and removed
|
||||||
* their associated drives from the list
|
* their associated drives from the list
|
||||||
|
|||||||
Reference in New Issue
Block a user