The issue is due to WinAPI's GetFileAttributes function can take a huge amount of time in various situations, like when the target server being offline (usalally).
The current solution is to wait at least 3 seconds for each GetFileAttributes function, then return the default value in case of the problem (or the returned value of the function, in case of normal situation - if it has been executed completely during the 3 seconds).
So there'll still be the hanging time (3 or 6 seconds) while the problem of network connection, but the hanging time (it could be 30 seconds more) is reduced considerablly.
"Wow64EnableWow64FsRedirection" call is also removed from x64 build (in which this call is unnecessary) in this commit to reduce the IO calls.
Fix#4306, fix#6178, fix#8055, fix#11388, fix#12553, fix#15540, close#15658
{L"Don Ho #3",QuoteParams::rapid,true,SC_CP_UTF8,L_TEXT,L"The smartphone is the best invention of the 21st century for avoiding eye contact with people you know while crossing the street."},
{L"Don Ho #4",QuoteParams::rapid,false,SC_CP_UTF8,L_TEXT,L"Poor countries' museums vs. rich countries' museums:\nThe first show what they have left.\nThe second show what they have stolen."},
{L"Don Ho #5",QuoteParams::slow,false,SC_CP_UTF8,L_TEXT,L"With great refactoring comes great regressions."},
{L"Don Ho #6",QuoteParams::rapid,false,SC_CP_UTF8,L_TEXT,L"Naming a variable always reminds me the effort I put into my existence,\nfor giving some sense to my meaningless life."},
{L"Anonymous #1",QuoteParams::slow,false,SC_CP_UTF8,L_TEXT,L"An opinion without 3.14 is just an onion."},
{L"Anonymous #2",QuoteParams::rapid,true,SC_CP_UTF8,L_TEXT,L"Before sex, you help each other get naked, after sex you only dress yourself.\nMoral of the story: in life no one helps you once you're fucked."},
{L"Anonymous #3",QuoteParams::rapid,false,SC_CP_UTF8,L_TEXT,L"I'm not totally useless. I can be used as a bad example."},
{L"Anonymous #20",QuoteParams::slow,false,SC_CP_UTF8,L_TEXT,L"Never make eye contact while eating a banana."},
{L"Anonymous #21",QuoteParams::rapid,true,SC_CP_UTF8,L_TEXT,L"I love my sixpack so much, I protect it with a layer of fat."},
{L"Anonymous #22",QuoteParams::rapid,true,SC_CP_UTF8,L_TEXT,L"\"It's impossible.\" said pride.\n\"It's risky.\" said experience.\n\"It's pointless.\" said reason.\n\"Give it a try.\" whispered the heart.\n...\n\"What the hell was that?!?!?!?!?!\" shouted the anus two minutes later."},
{L"Anonymous #23",QuoteParams::rapid,false,SC_CP_UTF8,L_TEXT,L"A programmer is told to \"go to hell\".\nHe finds the worst part of that statement is the \"go to\"."},
{L"Anonymous #23",QuoteParams::rapid,false,SC_CP_UTF8,L_TEXT,L"A C++ programmer is told to \"go to hell\".\nHe finds the most offensive part of that statement is the \"go to\"."},
{L"Anonymous #24",QuoteParams::slow,false,SC_CP_UTF8,L_TEXT,L"An Architect's dream is an Engineer's nightmare."},
{L"Anonymous #25",QuoteParams::rapid,true,SC_CP_UTF8,L_TEXT,L"In a way, I feel sorry for the kids of this generation.\nThey'll have parents who know how to check browser history."},
{L"Anonymous #26",QuoteParams::rapid,true,SC_CP_UTF8,L_TEXT,L"Q: What's the difference between git and github?\nA: It's the difference between porn and pornhub.\n"},
if(isSnapshotMode&&!isAlwaysInMultiInstMode)// if both rememberSession && backup mode are enabled and "Always In Multi-Instance Mode" option not activated:
{// Open the 2nd Notepad++ instance in Admin mode, then close the 1st instance.
if(_isAdministrator)
{
// Already in admin mode? File is probably locked.
if(isSnapshotMode&&!isAlwaysInMultiInstMode)// if both rememberSession && backup mode are enabled and "Always In Multi-Instance Mode" option not activated:
{// Open the 2nd Notepad++ instance in Admin mode, then close the 1st instance.
if(_currentStatus==DOC_INACCESSIBLE&&!fileExists)//document is absent on its first load - we set readonly and not dirty, and make it be as document which has been deleted
@ -289,9 +294,9 @@ bool Buffer::checkFileState() // returns true if the status has been changed (it