statamic / eloquent-driver

Provides support for storing your Statamic data in a database, rather than flat files.
https://statamic.dev/tips/storing-content-in-a-database
MIT License
104 stars 71 forks source link

Make AssetQueryBuilder for performance gains #218

Closed ryanmitchell closed 7 months ago

ryanmitchell commented 8 months ago

This PR brings an AssetQueryBuilder to eloquent driver, reducing the number of file systems calls made and removing the need for a stache cache of the path listing.

This is particularly useful for sites with a large number of assets in cloud storage, as asides from initially populating a folder cache and accessing assets individually, all queries, filtering and meta will be only accessed from the database.

Replaces https://github.com/statamic/eloquent-driver/pull/207 Closes https://github.com/statamic/eloquent-driver/issues/191

SylvesterDamgaard commented 7 months ago

I can confirm the migration is now working as expected.