Add a way to watch less folders

Created on 26 October 2021, over 3 years ago
Updated 27 February 2025, about 1 month ago

Problem/Motivation

hook_watch is now watching a lot of folders (especially if you are using a lot of contrib modules) and it can significantly slow down page loads.
Most projects will only want to watch their own modules or themes.

Steps to reproduce

  1. Enable hook_watch.
  2. Enable xhprof.
  3. Generate an xhprof report.
  4. See that RecursiveDirectoryIterator::hasChildren() is called thousands of times.

Proposed resolution

We could add a setting that allows users to specify which folders they want to watch.

Feature request
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

🇫🇷France prudloff Lille

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇫🇷France prudloff Lille

    I think the approach of this module is fundamentally flawed and uses way too much resources on slow disk.
    I don't think this can be significantly improved without rewriting the module entirely.

Production build 0.71.5 2024