Repository navigation
Description
Expected behaviour
QOwnNotes should remain responsive while OneDrive synchronizes the notes folder. External file changes should continue to be detected and loaded without causing the application to freeze.
I rely on external file-change detection because I also use AI agents that directly modify my Markdown notes.
Actual behaviour
QOwnNotes intermittently becomes unresponsive when OneDrive is actively syncing my notes folder.
Pausing OneDrive synchronization resolves the issue, but this isn't a practical long-term solution since I need my notes to sync between devices.
Disabling external file-change detection also isn't an option because other applications and AI agents regularly modify my notes.
I'm currently running QOwnNotes 26.11.5 on Windows.
I'm wondering if OneDrive is triggering excessive filesystem events or repeated note-folder scans that cause the application to hang.
Steps to reproduce
- Store the QOwnNotes notes folder inside a OneDrive-synchronized directory.
- Keep external file-change detection enabled.
- Use QOwnNotes while OneDrive synchronizes files.
- QOwnNotes intermittently becomes unresponsive.
- Pause OneDrive syncing and observe that the freezes stop.
Screenshots
N/A
Output from the debug section in the settings dialog
Expand
Debug output to be added.
Relevant log output in the Log panel
Expand
Log output to be added.
Additional context
Related issues that may be relevant:
- [SUPPORT/BUG] Text diff dialog is shown every 10 seconds #3396: OneDrive triggering repeated external change detection
- [BUG] Severe typing lag with Notes on a network share (SMB over VPN) since 26.x #3587: Freezing and performance issues with notes on a network share
- [BUG] Setting "Notify about all external modifications of the current note" - notification is not shown #3428: External modification notification issues
Ideally, there would be a way to handle filesystem changes from synchronization software efficiently without disabling external modification detection entirely.
Activity
[-][BUG][/-][+][BUG] QOwnNotes freezes during OneDrive synchronization[/+]pbek commentedon Nov 14, 2026
Can you please fill out the rest of the issue template and provide your debug settings dump and logs while this happens?
pbek commentedon Nov 14, 2026
And can you please update to the latest version?
pbek commentedon Nov 14, 2026
There is a plausible explanation in the filesystem watcher handling: changes to a watched file other than the current note can trigger a full note-index scan. Directory changes can also trigger an immediate scan and another scan one second later. These scans run synchronously, so repeated notifications during synchronization could cause UI stalls, especially if filesystem access is slow. This is a possibility, not yet a confirmed diagnosis for your setup.
In addition to the settings dump, debug logs and testing the latest version requested above, could you please clarify:
Notes directory was modified externally,other note was changed, ordeferred re-index after external directory changearound a freeze? Please include those log entries; the status messages may be translated.The linked issues had fixes that predate 26.11.5, so they do not establish that this is the same problem. Updating is still important: 26.11.6 also fixed a separate issue where autosaving could overwrite external changes while the external-modification dialog was open, but that is not a confirmed fix for these freezes.
If the logs do not reveal the cause, a Windows Process Monitor trace filtered to QOwnNotes.exe during a freeze would help identify which files and operations are involved. Please redact private paths or note names before sharing logs or traces.
skylord123 commentedon Nov 17, 2026
I upgraded yesterday from 26.11.5 to 26.11.10 and the issue got much worse: QOwnNotes locked up for several minutes until I gave up and force-killed it. I then tried 26.11.6, which doesn't have that multi-minute hang, but it still freezes when I edit a note and OneDrive syncs. Everything below is from 26.11.6. I can try to grab a log from 26.11.10 too if that helps.
Sanitized log attached. User, org, note and folder names are replaced with placeholders, and the Nextcloud XML responses are removed.
sanitized.log
What the log shows
This is one save (Ctrl+S) of a single note:
Stored 1 note(s) to diskNotes directory was modified externally(for the subfolder containing the saved note, presumably OneDrive touching it)buildNotesIndexof every subfoldernotesWereModified→ "Modification date didn't change" / "Note text and _currentNoteTextHash are the same, ignoring"deferred re-index after external directory changebuildNotesIndexSo it is the directory-change path you described: an immediate scan, then the deferred one. Each scan takes about 6–7 seconds, even though the note's content and modification date didn't change. I don't see
other note was changedanywhere.Most of each scan isn't spent on notes. The checksum stats say only ~0.56 s total:
Most of the time goes to ~230 lines per scan like this, which together take ~4–5 s:
My note folder is also a git repo. QOwnNotes' own git support is off (
isUseGit: no), but the.gitdirectory sits in the note folder. QOwnNotes tries to add every.git/objects/xx,.git/refs/...and.git/logs/...directory to the watcher, and every one of those calls fails slowly on OneDrive. MyignoreNoteSubFolderssetting is the default^\., so.gitis correctly skipped for notes. That ignore pattern doesn't seem to apply to the directory watcher. Applying it there would probably remove most of the freeze. Avoiding the second scan when nothing actually changed would roughly halve what's left.Your questions
QOwnNotes reports 169 notes. On disk the folder is 24.2 MB with 6,428 files and 294 folders. Most of the files are images I paste into notes. Most of the folders are
.gitinternals: the log alone shows 268 different.gitdirectories QOwnNotes tried to watch. Show subfolders is enabled (I use subfolders heavily).Yes, it already is.
On 26.11.6 it recovers by itself. I just edited a note and pressed Ctrl+S: it froze for ~7 seconds, unfroze, then froze again within a second for another ~4 seconds. That matches the two scans in the log. On 26.11.10 it didn't recover within several minutes.
I had this problem before and fixed it by enabling Ignore all external note folder changes. Now I use LLM agents to log things into my notes, so I need external changes to show up. Turning that setting back off is when the freezes came back.
Debug information
Trimmed to what seemed relevant and sanitized (paths, server, usernames, machine and domain names removed; system environment section dropped). I'm happy to provide more if needed.
Expand
pbek commentedon Nov 17, 2026
Thank you for the detailed report and logs! They confirm the repeated scans and reveal that QOwnNotes unnecessarily traverses .git even with Git support disabled. I'll address that first while keeping external-change detection enabled.
The much longer hang in 26.11.10 may have an additional cause. A log from that version would still be helpful, but isn't needed to begin fixing the unnecessary Git-directory traversal.
skylord123 commentedon Nov 17, 2026
Sounds good! I'll fire up 26.11.10 again and see if I can capture some logs from the longer hang. I'll report back with whatever I find.
Thanks for getting back to me so quickly and for digging into these issues! I really enjoy using QOwnNotes. It's become my go-to for both personal and work notes, so I really appreciate all the effort you put into maintaining and improving it!
skylord123 commentedon Nov 17, 2026
Got a log from 26.11.10. It covers one launch plus one edit + Ctrl+S. It's sanitized the same way as before (user, org, note and folder names replaced with placeholders, Nextcloud XML removed):
sanitized.log
Startup: 3m23s
During that gap the window doesn't appear. Task Manager shows the process with one thread using a full CPU core. Windows' per-process I/O counters showed ~20,000 "other" (non-read/write, i.e. metadata/directory) operations per second and almost no reads, about 2.7 million operations in the first ~2.5 minutes. No
Failed to add pathlines are logged during startup. This is most likely the multi-minute lock-up I mentioned before. Yesterday I also left one launch running and it had opened by the next morning.One save: ~89s frozen
Stored 1 note(s) to diskNotes directory was modified externally(the saved note's subfolder)Failed to add path to directory watcherlinesnotesWereModified→ "Modification date didn't change" / "Note text and _currentNoteTextHash are the same, ignoring"deferred re-index after external directory changeCompared with 26.11.6
The number of failed watcher calls is the same; each call just takes ~9× longer in 26.11.10. Note checksumming is negligible in both (the cumulative checksum stats only went from 169 to 546 calls / 75 ms across startup and both scans).
Two other things stood out:
.git. Example (note the mixed separators):QFileSystemWatcher::addPath()also returns false when the path is already being watched. If every re-index re-adds all directories that were added at startup, they would all "fail" this way. That would fit external changes still being detected even though the subfolders "fail". Just a guess from the Qt side; I haven't looked at the code.Correction to my earlier comment
I said most of the 6,428 files in the note folder were images. I counted, and 6,205 of the 6,428 files and 267 of the 294 folders are inside
.git. Only ~220 files are actual notes and images. So the note folder is mostly git internals, which makes the.gittraversal fix even more relevant.I'm happy to test a build with the
.gitfix whenever it's ready.FYI, I'm using Claude Desktop on my work PC to pull and sanitize the logs and help triage this. If there's any more troubleshooting I can do on my end (a Process Monitor trace, a test build, different settings), just let me know.
pbek commentedon Nov 18, 2026
Thank you for the additional log and measurements! I've committed a targeted fix in 85ba97e: QOwnNotes no longer recursively traverses and watches .git internals. Those events were already ignored by the change handlers, so these watches served no useful purpose—even with QOwnNotes' Git support enabled.
This also removes the repeated path-security checks across the thousands of Git files, which plausibly explains why 26.11.10 was much slower. The long startup gap in your log occurs where watcher setup runs; successful registrations aren't logged. We still need your testing to confirm how much this improves your Windows/OneDrive setup.
External note-change detection remains enabled. The delayed follow-up scan is retained because it is needed to catch some sync clients' temporary-file/atomic-replacement updates. Existing watches are cleared before watcher setup, so duplicate registration isn't established as the explanation for the failures.
Validation passed: the application build and full Linux VM test suite, including a new regression test verifying that Git internals remain unwatched after re-indexing while externally created notes are still detected and watched. This does not replace testing on Windows with OneDrive.
When a Windows build containing this commit is available, could you please test it and report:
Please include a fresh sanitized log if significant freezes or note-folder watcher failures remain. Let's keep this issue open until we have those results.
#3847 noteindexmanager: avoid recursively watching Git internals
pbek commentedon Nov 18, 2026
There now is a new release (soon), could you please test it and report if it works for you?
skylord123 commentedon Nov 18, 2026
Just tested 26.11.11 and it's a huge improvement, thank you! Startup takes about 4 seconds again, and the watcher errors are gone. External edits from my agents are still picked up correctly.
There is still a short freeze after each save, about 1.3 to 2.4 seconds twice (the initial re-index and the deferred one). With OneDrive paused there is no freeze at all, so I looked into what OneDrive does to trigger it.
About 1.5 seconds after QOwnNotes saves a note, OneDrive sends an attribute-change notification for that file. Nothing visible actually changes: the file's attributes, size and modified time are identical before and after. I assume this is OneDrive updating its sync state on the file. Qt reports this as
directoryChangedfor the folder, and QOwnNotes then re-indexes the whole note folder. Qt's directory-only notification flags include attribute changes as well, so watching the note files separately from the folders would not avoid it.To find this, I recorded the note folder while saving and put everything on one millisecond timeline: filesystem changes in the note folder, which notification type each change raised, when the QOwnNotes window froze and for how long, CPU use of QOwnNotes and OneDrive, and the matching QOwnNotes log lines. The first run covers startup, a save with OneDrive paused (no reaction at all), and saves with OneDrive running. The second run has one watcher per notification type on the note's folder, which is where the attribute-only notification shows up. It's sanitized like the earlier logs (note and folder names are placeholders):
sanitized.log
This is already a huge improvement though. Would just be nice if it didn't freeze at all when OneDrive is involved.
#3847 noteindexmanager: skip unchanged Windows subfolder scans
pbek commentedon Nov 19, 2026
Thanks for confirming that 26.11.11 brought startup back to about four seconds, eliminated the watcher errors, and still picks up your agents’ edits. The notification trace was especially helpful in narrowing down the two remaining stalls after a save.
In the upcoming 26.11.13: on Windows, QOwnNotes checks the affected subfolder before rebuilding the full note index. If its notes and subfolders are unchanged, it skips the rebuild. The check compares note contents, not just file size and modification time, and falls back to the normal scan if it can’t verify the folder. Nearby notifications share one delayed check so sync clients that replace a file by renaming it can still be detected.
Once the Windows build is available, could you try saving a note in the same subfolder with OneDrive running and let me know whether either stall remains? Please also check that an external edit from one of your agents still shows up. If it still stalls, a short log around one save would be helpful.
#3847 noteindexmanager: skip unchanged Windows subfolder scans
#3847 noteindexmanager: skip unchanged Windows subfolder scans
skylord123 commentedon Nov 19, 2026
Tested the
nextbuild with your subfolder check, and it works. Thank you!With OneDrive running, OneDrive's attribute-only notification still arrives about 1.5 seconds after each save, but QOwnNotes no longer rebuilds the index. There is no "Notes directory was modified externally" and no deferred re-index anymore.
An external edit from one of my agents was still picked up correctly. QOwnNotes re-indexed and reloaded the current note.
There are still two short pauses of about half a second per save, at the moments the subfolder check and the delayed check run. My guess is that reading the folder's notes (about 100 notes, 1.4 MB) is what takes that time on OneDrive. It is barely noticeable, so I'm happy with it as is.
pbek commentedon Nov 19, 2026
Gereat, thank you for testing!