Context
PR #256 added isIncludedFile in internal/server/server.go to filter watcher events to only included files.
Source PR: #256
Suggested by: @claude[bot]
Comment type: PR review (round 8)
Task Description
Current implementation iterates all pages and checks each page's IncludedFiles slice — O(pages × includes-per-page) per FS event. The watcher already maintains an extra map (the set passed via SetExtraFiles) used for the same filtering at the fsnotify subscription level.
Expose a method like s.watcher.IsExtra(absPath) and have isIncludedFile delegate to it. O(1) lookup, removes a redundant scan path.
Original Comment
isIncludedFile has O(pages × files) complexity per watcher event. The extra map already maintained in Watcher could be consulted directly. Consider delegating: s.watcher.IsExtra(absPath) would be O(1).
— @claude[bot], round 8
Auto-created by /prmonitor from PR review comments.
Context
PR #256 added
isIncludedFileininternal/server/server.goto filter watcher events to only included files.Source PR: #256
Suggested by: @claude[bot]
Comment type: PR review (round 8)
Task Description
Current implementation iterates all pages and checks each page's
IncludedFilesslice — O(pages × includes-per-page) per FS event. The watcher already maintains anextramap (the set passed viaSetExtraFiles) used for the same filtering at the fsnotify subscription level.Expose a method like
s.watcher.IsExtra(absPath)and haveisIncludedFiledelegate to it. O(1) lookup, removes a redundant scan path.Original Comment
Auto-created by /prmonitor from PR review comments.