2

I was just wondering if anyone knows about negative performance impacts of multiple <move /> statements in a theme's layout XML files. Sometimes the <move /> statement is even in the same file that the element that gets repositioned: it gets defined inside some block or container, and afterward moved somewhere else.

I often see XML files in a theme with like 20 <move /> statements per file, which results in 100+ <move /> statements per theme.

I was not able to find the place in the source code where they are handled, so I "assume" for the generation of the "whole" layout XML, that...

  • ...it's easy when <referenceBlock /> or <referenceContainer /> is used because a lot of the structure is already present in the XML
  • ...it's expensive when <move /> statements are used because Magento has to parse the XML tree over and over again and again

It would be nice if someone could point me where I can find this in the code, or even had some performance benchmarks or experience to share.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.