JorgeFerrer/liferay-portal — comment on commit c24b944c024d6ee7b697292390b1c570c1d85bfc
File:  line 0
By rotty3000:

Every time we call `LayoutLocalServiceUtil.updateLayout(layout, false);` for public layouts, it invokes `com.liferay.portal.model.LayoutListener.onAfterUpdate(Layout layout)` which invokes `CacheUtil.clearCache(layout.getCompanyId());` which is very expensive. Especially since we're updating preferences a lot in staging.

We should call `LayoutUtil.updateImpl(layoutPrototypeLayout, false);` instead.