linkit
linkit copied to clipboard
Is there a way to eager-load linked entries?
I notice there's a DB query for each Linkit field pointing to an entry (understandably, to fetch entry title and whatnot). Is there a way to eager-load this stuff? Thanks!
@proimage did you ever get any resolution on this? I'm looping through entries to build the header and footer navigation which results in dozens of additional queries per page load.
Caching helps of course but it still seems like a no brainer to eager-load these for my use case.
Nope; at this point I'd tend to just use an Entries fieldtype to link to other entries for a nav, instead of using LinkIt.
Any news on this? Would love to see this as well
I'm also interested if that possible :)
+1! I'd love to see eager loading on this field as it would massively decrease database queries for things like footers.
Is there an obvious pattern that other fields have implemented in order to support eager loading?
¯_(ツ)_/¯
¯_(ツ)_/¯
(try triple backslashes, eg ¯\\\_(ツ)_/¯
: ¯\_(ツ)_/¯ )
So, we have added support for eager loading in the upcoming release 1.2, current dev branch on the craft 3 repo (this is the c2 version) see: https://github.com/presseddigital/linkit/issues/89
We are still testing before release, if you want to provide feedback, please do grab the latest version from the develop branch, defo test / local versions only as not production ready. Also note the package name change, from fruitstudios to presseddigital