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
High query count crept back into 2.3 (field config) #1303
Comments
Correct, good spot! |
I'm having trouble reproducing this one mate. I've create two datasources, one with a Text Input field from one section, and the other selecting a Text Input and a Textarea from another section. The queries don't double up. Do you have any other extensions installed? Can you post your full query log? Running through the code block, the only way I can see this happening is when |
Shall I send you a zipped up build with a demo page where this is replicable? Can do tonight. |
Yeah, please! |
Here's a demo build with everything stripped out. Install the database (config points to db http://cl.ly/0Z2R3i3n1W3A0m2m3f1N There are three sections: 1. Duplicate queriesAs described above, there are duplicate queries selecting field config from each 2. All field types are queried, not just those in DSsEven fields that are not selected from DSs are queried here! An example: profile the page as-is and you won't see any reference to 3. Odd query that failsJust spotted this in the output:
It occurs twice, and also seems to originate from
Hope this is useful! |
TY, will give it a whirl! |
Ah, I have a feeling all these issues originate from the Select Box Link field :) |
I've spotted one part of FieldManager that causes unnecessarily high repetitive queries, and is ripe for optimisation. Looks like it was introduced in this commit:
b23cb7e
This code can induce several of the same query:
I'm not quite sure how or why it occurs, but these queries double up if you add more data sources to the page. For example with one data source (that has a unique input field):
If I add another data source, pulling from another section also with a unique input field:
You can see the new unique input fields have been added to the query, but the query is repeated with the previous ID too. And if I add a third data source:
Oddly third datasource doesn't even select a unique input field! One exists in the section, but I am not selecting it.
When discovering this bug I am using 13 different field types in my sections, and three data sources on the page, meaning 3x13 (39) queries, when ideally this should only be 13, right?
The text was updated successfully, but these errors were encountered: