Skip to content

Get rid of cleanFolder() in the Watcher if possible for performance #24421

Closed

Description

@PVince81

After debugging the watcher/scanner, I noticed that at the end of the scan session it will call cleanFolder($path) and will iterate over all cache entries inside that folder and call file_exists to find out whether the file still exists.

As far as I understand, diffing the children of a folder is already done in scanChildren, so not sure why it has to be done again here.

@icewind1991 can you clarify ? Can we get rid of this extra cleanup to gain some performance ?

Activity

  1. PVince81 commented on May 3, 2016

    @PVince81
    ContributorAuthor

    Found this: https://github.com/owncloud/core/blob/v9.0.1/lib/private/files/cache/scanner.php#L397

    Maybe we didn't have this piece about $removedChildren in the past which would explain the requirement for cleanFolder

  2. added this to the backlog milestone on Jun 14, 2016
  3. PVince81 commented on Oct 14, 2016

    @PVince81
    ContributorAuthor

    Fixed through #25103

  4. PVince81 commented on Oct 14, 2016

    @PVince81
    ContributorAuthor

    Hmm, that PR is only for fed shares.

    I think we should eventually get rid of it completely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions