Skip to content

Conversation

@GuySartorelli
Copy link
Member


| Field name | Description |
| ---------- | -----------
| ---------- | ----------- |
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated fix to table syntax. It's rendering fine without this for now but other markdown parsers could be more strict if we change our doc renderer in the future.

@GuySartorelli GuySartorelli force-pushed the pulls/6/filesystem-performance branch from 39f9cbd to e7ccff0 Compare May 14, 2025 04:31
Copy link
Member

@emteknetnz emteknetnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm part way reviewing this, will submit for now. Depending on what we do on the main PR may change this PR quite a bit

- Reduced the number of times we check if a folder is empty by removing duplicate checks.
- Added [`Filesystem::isEmpty()`](api:SilverStripe\Assets\Flysystem\Filesystem::isEmpty()) to check if a folder is empty. With the default local filesystem adapter, this means we check exactly one file to know if the folder is empty or not. With other adapters it depends on the implementation (e.g. the AWS S3 adapter will likely still fetch a full page of up to 1000 files).
- Added [`GlobContentLister`](api:SilverStripe\Assets\Flysystem\GlobContentLister) and [`GlobbableFileIDHelper`](api:SilverStripe\Assets\FilenameParsing\GlobbableFileIDHelper) interfaces to enable looking for image variants using a glob pattern. This dramatically improves performance with the default local filesystem adapter, but by default will have no effect for other adapters.
If you are using a different adapter that might support globbing such as using FTP (for specific FTP servers), consider implementing the `GlobContentLister` interface.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using FTP as a filesystem? For a Silverstripe install? That seems very strange, is there a different example you could give that's a little more standard?

Copy link
Member Author

@GuySartorelli GuySartorelli May 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The official adapters are:

  • Local
  • FTP
  • InMemory
  • Read-Only
  • Path Prefixing
  • AWS S3
  • AsyncAws S3
  • Azure Blob Storage
  • Google Cloud Storage
  • MongoDB GridFS
  • SFTP (V2)
  • SFTP (V3)
  • WebDAV
  • ZipArchive

If another of those stands out as a better example which can support glob pattern matching I'll be happy to swap it out. I think SFTP can handle glob pattern matching.

@GuySartorelli GuySartorelli force-pushed the pulls/6/filesystem-performance branch from e7ccff0 to 82c962f Compare May 19, 2025 21:16
@emteknetnz emteknetnz merged commit e855c31 into silverstripe:6 May 22, 2025
3 checks passed
@emteknetnz emteknetnz deleted the pulls/6/filesystem-performance branch May 22, 2025 03:29
emteknetnz pushed a commit to creative-commoners/developer-docs that referenced this pull request Jul 22, 2025
lozcalver pushed a commit to lozcalver/developer-docs that referenced this pull request Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants