You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 10, 2022. It is now read-only.
I've got a page with a map that shows 246 entries that use an Address field. This adds one query for each address field lookup so the page uses up a lot of memory and takes a while to load.
I am using Craft Blitz to cache the page, but when the cache is busted and when a visitor goes to this page the entire site goes down when a user loads this page until all of the data is loaded.
Can Eager Loaded support be added so these queries can be made along with the entries that contain the Address field?
For reference, the queries out of the Yii debug toolbar look like this:
Time
Duration
Type
Duplicated
Query
11:51:34.662
0.2 ms
SELECT
1
SELECT * FROM craft_smartmap_addresses WHERE (elementId='676') AND (fieldId='4')[+] Explain
11:51:34.663
0.2 ms
SELECT
1
SELECT * FROM craft_smartmap_addresses WHERE (elementId='677') AND (fieldId='4')[+] Explain
11:51:34.663
0.2 ms
SELECT
1
SELECT * FROM craft_smartmap_addresses WHERE (elementId='678') AND (fieldId='4')[+] Explain
11:51:34.664
0.2 ms
SELECT
1
SELECT * FROM craft_smartmap_addresses WHERE (elementId='679') AND (fieldId='4')[+] Explain
11:51:34.665
0.2 ms
SELECT
1
SELECT * FROM craft_smartmap_addresses WHERE (elementId='680') AND (fieldId='4')[+] Explain
11:51:34.666
0.2 ms
SELECT
1
SELECT * FROM craft_smartmap_addresses WHERE (elementId='681') AND (fieldId='4')[+] Explain
11:51:34.667
0.2 ms
SELECT
1
SELECT * FROM craft_smartmap_addresses WHERE (elementId='682') AND (fieldId='4')[+] Explain
11:51:34.668
0.2 ms
SELECT
1
SELECT * FROM craft_smartmap_addresses WHERE (elementId='683') AND (fieldId='4')[+] Explain
11:51:34.669
0.1 ms
SELECT
1
SELECT * FROM craft_smartmap_addresses WHERE (elementId='684') AND (fieldId='4')
Unfortunately my client is putting pressure on me to come up with a solution and eager loading sounds like a good fix for this situation, but also for other times where we might need an Address field.
Thanks,
Will
The text was updated successfully, but these errors were encountered:
I'm not prepared to go down that rabbit hole at this exact moment, so I'm mainly noting this for future reference. We'll leave this ticket open until I can implement it in a future version.
I've got a page with a map that shows 246 entries that use an Address field. This adds one query for each address field lookup so the page uses up a lot of memory and takes a while to load.
I am using
Craft Blitz
to cache the page, but when the cache is busted and when a visitor goes to this page the entire site goes down when a user loads this page until all of the data is loaded.Can Eager Loaded support be added so these queries can be made along with the entries that contain the Address field?
For reference, the queries out of the Yii debug toolbar look like this:
craft_smartmap_addresses
WHERE (elementId
='676') AND (fieldId
='4')[+] Explaincraft_smartmap_addresses
WHERE (elementId
='677') AND (fieldId
='4')[+] Explaincraft_smartmap_addresses
WHERE (elementId
='678') AND (fieldId
='4')[+] Explaincraft_smartmap_addresses
WHERE (elementId
='679') AND (fieldId
='4')[+] Explaincraft_smartmap_addresses
WHERE (elementId
='680') AND (fieldId
='4')[+] Explaincraft_smartmap_addresses
WHERE (elementId
='681') AND (fieldId
='4')[+] Explaincraft_smartmap_addresses
WHERE (elementId
='682') AND (fieldId
='4')[+] Explaincraft_smartmap_addresses
WHERE (elementId
='683') AND (fieldId
='4')[+] Explaincraft_smartmap_addresses
WHERE (elementId
='684') AND (fieldId
='4')Unfortunately my client is putting pressure on me to come up with a solution and eager loading sounds like a good fix for this situation, but also for other times where we might need an Address field.
Thanks,
Will
The text was updated successfully, but these errors were encountered: