You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The NPPM_INTERNAL_RELOADSCROLLTOEND message is sent every time the monitored file is updated. The handler for this message calls buf->reload() synchronously.
If writes are frequent and the file is large (or IO slow), reload() will take longer to finish than it takes for more NPPM_INTERNAL_RELOADSCROLLTOEND messages to come in. Messages received while reload() is still running are queued up.
Each message will be handled in the order received until all have completed, even after writes have stopped.
Suppose reload() takes 250ms, and 100 writes are made over 10 seconds.
Notepad++ will be unresponsive for 25 seconds (the time it takes for 100 reloads), even though writing stopped after 10 seconds.
Ideally, the message handler should only set a flag showing that a reload is needed, and then return.
A separate timer should check the flag and if set, unset it and reload the file.
Steps to Reproduce the Issue
In a command prompt run the following: for /l %x in (1,1,1000) do echo line number %x >> testfile.txt
While this runs, open the resulting testfile.txt in notepad++ and turn on file monitoring
Expected Behavior
Notepad++ should remain responsive as it updates the file, and stop reloading it once the command is finished.
Actual Behavior
Notepad++ is completely unresponsive until long after the command has finished.
Debug Information
Notepad++ v7.9.1 (64-bit)
Build time : Nov 2 2020 - 01:07:46
Path : C:\Program Files\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 1803
OS Build : 17134.2026
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll XMLTools.dll
The text was updated successfully, but these errors were encountered:
Still a HUGE problem in 8.5.4
I LOVE Notepad++ ... EXCEPT FOR THIS - PLEASE FIX THIS ONE
Same problem has existed for YEARS
Please fix!!!!
I may have to go look at the code and fix it myself
Still a HUGE problem in 8.5.4 I LOVE Notepad++ ... EXCEPT FOR THIS - PLEASE FIX THIS ONE Same problem has existed for YEARS Please fix!!!! I may have to go look at the code and fix it myself
Thanks for commenting. I've been wondering for years if maybe I'm the only one who uses the monitor feature.
When I opened this issue I took a crack at tracking it down in the code, but only got as far as identifying the message responsible. My C++ isn't strong enough to fix it myself, at least not while I have a day job ;)
Description of the Issue
The NPPM_INTERNAL_RELOADSCROLLTOEND message is sent every time the monitored file is updated. The handler for this message calls buf->reload() synchronously.
If writes are frequent and the file is large (or IO slow), reload() will take longer to finish than it takes for more NPPM_INTERNAL_RELOADSCROLLTOEND messages to come in. Messages received while reload() is still running are queued up.
Each message will be handled in the order received until all have completed, even after writes have stopped.
Suppose reload() takes 250ms, and 100 writes are made over 10 seconds.
Notepad++ will be unresponsive for 25 seconds (the time it takes for 100 reloads), even though writing stopped after 10 seconds.
Ideally, the message handler should only set a flag showing that a reload is needed, and then return.
A separate timer should check the flag and if set, unset it and reload the file.
Steps to Reproduce the Issue
for /l %x in (1,1,1000) do echo line number %x >> testfile.txt
Expected Behavior
Notepad++ should remain responsive as it updates the file, and stop reloading it once the command is finished.
Actual Behavior
Notepad++ is completely unresponsive until long after the command has finished.
Debug Information
Notepad++ v7.9.1 (64-bit)
Build time : Nov 2 2020 - 01:07:46
Path : C:\Program Files\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 1803
OS Build : 17134.2026
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll XMLTools.dll
The text was updated successfully, but these errors were encountered: