Performance bug: getAfterElementHtml() method implementation in \Magento\Framework\Data\Form\Element\AbstractElement descendants is sometimes computation expensive but called by the core multiple times for the same for element without caching

Examples of computation expensive getAfterElementHtml() implementations:

\Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Price::getAfterElementHtml()
\Magento\Catalog\Block\Adminhtml\Helper\Form\Wysiwyg::getAfterElementHtml()
\Magento\Catalog\Block\Adminhtml\Product\Edit\NewCategory::getAfterElementHtml()
\Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Category::getAfterElementHtml()

Especially crazy code (3 calls to getAfterElementHtml in the 7 code lines):

https://github.com/magento/magento2/blob/d31c0067106534abd86818de22d3f9d09d90e5d2/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php#L370-L376

The author of this code must learn PHP and do not write anymore the code like

if ($this->getAfterElementHtml() && $this->getAfterElementHtml() != '')

Another call:
https://github.com/magento/magento2/blob/02e0378c33054acb0cdb8d731d1e2b2c2069bc1b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/form/renderer/fieldset/element.phtml#L20

https://github.com/magento/magento2/issues/2189