Skip to content
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

Resolver Caching #11

Open
tonyketcham opened this issue Nov 29, 2021 · 3 comments
Open

Resolver Caching #11

tonyketcham opened this issue Nov 29, 2021 · 3 comments
Assignees
Labels
core central engine enhancement New feature or request performance Speeds up Flatbread
Milestone

Comments

@tonyketcham
Copy link
Collaborator

We can store resolved fields which will come in handy for advanced, nested filtering. This can prevent the same node field from being calculated tens or even thousands of times over the course of sequential queries.

Some options to consider:

@tonyketcham tonyketcham added core central engine enhancement New feature or request labels Nov 29, 2021
@tonyketcham tonyketcham added this to the Beta Release 🍾 milestone Nov 29, 2021
@tonyketcham tonyketcham self-assigned this Jan 6, 2022
@tonyketcham tonyketcham modified the milestones: v1.0-Beta 🍾, v1.0 🌿 Jul 22, 2022
@tonyketcham tonyketcham changed the title Memoization Resolver Caching Jul 22, 2022
@tonyketcham tonyketcham added the performance Speeds up Flatbread label Jul 22, 2022
@odama626
Copy link
Collaborator

what if we do hashing and dump everything into an sqlite db during generate schema and then filters can just be sql queries?

@tonyketcham
Copy link
Collaborator Author

I don't necessarily want to depend Flatbread's core directly on SQL. But I agree re: hashing and dumping into a DB of sorts; having the schema cached along with hashing loaded nodes & resolved fields should prevent unnecessary recalculations. Combined with a granular cache invalidation strategy for CRUD workflows, Flatbread should scale well to tens of thousands of content nodes with high performance.

@tonyketcham
Copy link
Collaborator Author

We could stand on the shoulders of giants and follow Gatsby's DB choice with LMDB, which is the fastest in-memory Node DB in town https://github.com/kriszyp/lmdb-js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core central engine enhancement New feature or request performance Speeds up Flatbread
Projects
None yet
Development

No branches or pull requests

2 participants