-
-
Notifications
You must be signed in to change notification settings - Fork 549
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Deal with paths until necessary ... There's a lot of overhead involved in converting paths to asset instances and hydrating them (reading the meta files). Especially on folders with thousands of assets. Even worse on S3 when it has to do a ton of API requests. Use paths and natural limiting/offset unless we need asset instances, eg. when ordering or filtering with wheres. * Don't use orderBy, which would trigger the heavier query builder mode ... It naturally sorts by basename anyway. * Cache the meta * Prevent two flysystem calls when getting all asset files. * Cache flysystem call for one minute instead of to class property. Though it's still a bit slow, this makes navigating between pages in the asset browser a bit faster. The downside is if any assets are added or deleted, it may take up to 1 minute to propagate. * Move asset listing cache into `AssetContainer`, and bust when saving/moving assets. * Make asset listing cache time configurable. Co-authored-by: Jason Varga <jason@pixelfear.com>
- Loading branch information
1 parent
a90605f
commit 5e3f20a
Showing
4 changed files
with
112 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters