The FH LUA file system runs very slowly sometimes.
In some situations it appears to have frozen FH in a 'hung' state.
The following LUA Plugin exhibits the problem and takes nearly a minute to complete:
for i=1,500 do
file, err = io.open('Test.log','a')
if file == nil then error(err) end
file:write('Data:0,1,'2'n')
file:close()
end
The following elements must be present in the written line:
The word Data: at start or end of line
Some commas , separating other data
Pair of quotes ' or '
If a line such as file:write('Data=0 1 (2)n') is used instead, it completes within a second or two.
The problem appears to be not so much what is being written, but that the above key elements exist in lines in the file being appended.
It afflicts Windows 7 and Vista but not my copy of XP.
The problem came to light because my LUA Plugin was writing a log file using the word Data: and contained commas and quotes.
As the file grew large the LUA Plugin took several minutes to complete the log, and appeared to have 'hung'.
If the word Data: was changed to Data= it completed in a second or two.
ID:5616
* LUA Slow File Append
- tatewise
- Megastar
- Posts: 27076
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
LUA Slow File Append
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- Jane
- Site Admin
- Posts: 8440
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
LUA Slow File Append
I have just pasted your code in to FH and it ran in under a second even when in the debugger. system : Win 7 x64
Is it possible another program on your system (a backup program or antivirus perhaps?) is conflicting.
Is it possible another program on your system (a backup program or antivirus perhaps?) is conflicting.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
- tatewise
- Megastar
- Posts: 27076
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
LUA Slow File Append
I have tried various things such as switching off Indexed Search to no avail.
It appears to be caused by Microsoft Security Essentials on its Settings tab Real-time protection options.
If I untick Monitor file and program activity on your computer the problem vanishes.
MSE is on Windows 7 and Vista but not XP.
Strange that such a specific combination of characters upset it.
It appears to be caused by Microsoft Security Essentials on its Settings tab Real-time protection options.
If I untick Monitor file and program activity on your computer the problem vanishes.
MSE is on Windows 7 and Vista but not XP.
Strange that such a specific combination of characters upset it.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry