-
Notifications
You must be signed in to change notification settings - Fork 73
DOC Document filesystem performance improvements #737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC Document filesystem performance improvements #737
Conversation
1095184 to
39f9cbd
Compare
|
|
||
| | Field name | Description | | ||
| | ---------- | ----------- | ||
| | ---------- | ----------- | |
There was a problem hiding this comment.
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.
39f9cbd to
e7ccff0
Compare
emteknetnz
left a comment
There was a problem hiding this 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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
e7ccff0 to
82c962f
Compare
Issue