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

Smart eager loading #172

Open
wants to merge 9 commits into
base: master
from

Conversation

@moufmouf
Copy link
Member

moufmouf commented Sep 5, 2019

This PR adds a new feature: Smart Eager Loading.

The idea behind smart eager loading is to track the origin of each bean. If a bean originates from a result set, when a related bean is accessed (through a foreign key), instead of quering only the data related to the bean, we query the data related to all related beans.

This optimisation allows us to jump from N+1 queries to only 2 queries \o/

@coveralls

This comment has been minimized.

Copy link

coveralls commented Sep 5, 2019

Coverage Status

Coverage decreased (-0.3%) to 97.447% when pulling a816e5b on moufmouf:smart_eager_load into 45a8c05 on thecodingmachine:master.

@moufmouf moufmouf force-pushed the moufmouf:smart_eager_load branch from 13ad614 to f51198b Sep 9, 2019
moufmouf added 2 commits Sep 9, 2019
This will allow us in the future to build a oneToMany handler for smart eager loading.
@moufmouf moufmouf force-pushed the moufmouf:smart_eager_load branch from fa7685f to a816e5b Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.