Hi @DmitryTsepelev, and thanks again for ArLazyPreload.
As you probably recall, I have been a protagonist of fighting N+1 for a while:
And was happy to use your gem.
N1Loader complements ArLazyPreload well for cases where users want ArLazyPreload automatic association loading, but also need lazy batched loading for things that are not regular ActiveRecord associations, such as:
- computed values
- custom loaders
- service/API calls
- GraphQL fields
- other N+1-prone derived data
The ArLazyPreload integration in N1Loader preserves ArLazyPreload context and supports isolated loaders, so the two gems work together naturally rather than overlapping awkwardly.
Would you be open to mentioning N1Loader somewhere in the ArLazyPreloader README or docs as a companion gem for those cases? I think that could be useful for ArLazyPreload users who want to keep ArLazyPreloader for associations and use N1Loader to cover the remaining N+1 gaps.
Hi @DmitryTsepelev, and thanks again for
ArLazyPreload.As you probably recall, I have been a protagonist of fighting N+1 for a while:
And was happy to use your gem.
N1Loader complements
ArLazyPreloadwell for cases where users wantArLazyPreloadautomatic association loading, but also need lazy batched loading for things that are not regular ActiveRecord associations, such as:The
ArLazyPreloadintegration inN1LoaderpreservesArLazyPreloadcontext and supports isolated loaders, so the two gems work together naturally rather than overlapping awkwardly.Would you be open to mentioning N1Loader somewhere in the
ArLazyPreloaderREADME or docs as a companion gem for those cases? I think that could be useful forArLazyPreloadusers who want to keepArLazyPreloaderfor associations and use N1Loader to cover the remaining N+1 gaps.