Order by group
I just noticed the update and saw the following "Early parsed Low Variables are now parsed in the same order as displayed in their group in the CP." Does that mean they are parsed by the group display order, parsed by display within their group, or both?
I think you mean by group order but I want to make sure.
Nevertheless, I appreciate this change very much. I will be able to completely do away with Snippets. :D
Now if you add custom member data I could get ride of Super Globals too. ;)
Thanks again for a great product and wonderful support.
Replies
Low 23 Feb 2012 09:30
They are ordered first by group *ID*, then by the order in their group. This is because of performance reasons. Ordering the vars by group order, then order in the group, will add more overhead to the query used to fetch the early parsed LV. I wanted to keep that query as light weight as I could, hence the decision.
JimmyFurtado 23 Feb 2012 10:29
Right after posting my question, I went in and looked at your code. I understand. You didn't want to add the overhead of doing a query with a join on the other table. I worked around this issue by manually (at least with some Mysql queries) renaming the group_ids to get the parse order that I want.
Have you thought about adding the group_order field to the variables table and then updating both tables when groups are reordered? I know that denomalizes the tables somewhat, but that would provide a more intuitive set-up for typical users while providing the best possible performance.
Low 23 Feb 2012 10:50
Yeah, that's exactly it. In my tests, adding the extra join caused a (relatively) big increase in time it took to execute the query.
I'll consider the solution you're proposing, but I also recognize it being an edge case.