ProgerXP / Notepad2e

Word highlighting, simultaneous editing, split views, math evaluation, un/grep, comment reformatting, UAC elevation, complete regexps (PCRE), Lua lexers, DPI awareness and more (XP+)
Other
375 stars 52 forks source link

Improve File Change Notification for slow medium #409

Closed ProgerXP closed 1 year ago

ProgerXP commented 2 years ago

Since file monitoring is on the main thread (WM_TIMER), slow FindFirstFile() makes the program almost non-responsive. This is common with network shares outside of the local network. A simple solution is to disable monitoring or increase polling interval, but a better approach would be to move monitoring to another thread. I have briefly checked the code and it seems easy to convert WatchTimerProc() into a thread function.

Related to #241.

cshnik commented 2 years ago

Done.

ProgerXP commented 2 years ago

I have started to see notifications when file is saved because of Save On Lose Focus (#164). This is extremely rare but I am confident there is a bug in the implementation.

Update: #164 might be causing this more often but this definitely occurs even with it disabled.

cshnik commented 1 year ago

Fixed.