Hi. very good question, and the same trap I fell into.


Hi. very good question, and the same trap I fell into.

First off the methods are made to optimize queries that you are iterating through. If you are having performance issues, then you need to remove the iteration and use values() instead.

Second to that, I tried using both of these for optimizing views and while in some cases they did have an effect, that effect was minimal. The documentation also states that if used incorrectly, then they can reduce efficiency.

My comment was to point out that these methods will have little to no impact on the overall performance of a view, compared to other options and they are really not easy to understand or use.

Thus my suggestion is to not fall into the trap that they can have a significant impact on performance and to rethink on how and what data you are gathering, rather than try to optimize using these.