Skip to content

Conversation

@Nerian
Copy link

@Nerian Nerian commented Apr 20, 2022

Hi,

This PR adds a preloads method to add a hook so we can preload relations in collections so that we can avoid n+1 issues

@adamcrown
Copy link
Member

Thanks @Nerian. I pushed up some changes to address a failing spec. It looks like it caused some merge conflicts. Sorry about that.

About the PR, I like the idea of this. However, I'm a bit concerned that it could have a negative impact on performance since there is so much logic being added, especially in the case where there is a cache hit. Would you be willing to do some performance comparisons, with and without this change?

@Nerian
Copy link
Author

Nerian commented Jun 7, 2022

We have been using this for a few months in production and it has worked fine. But I added more changes in some other branch so maybe I will rebase this branch with all these changes and submit again.

I like the idea of measuring performance difference between versions of cache-crispies. Is there a rake task I can use for that, or should I write one? Should I perhaps use this? https://github.com/codenoble/cache-crispies-performance-comparison

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