- Add the property below in portal-ext.properties:
- Start the server and login as Admin
- Go to Liferay DXP > Content > Web Content > top-right ellipsis icon > Structures > Add a new structure
- The structure should have a repeatable text field and 5 nested text fields.
- you can just add the following JSON code in the source tab
- Once added, add a dummy (empty) template to such structure
- Create a new Web Content from such structure
- Replicate the same field 460 times with this JS loop that can be executed from the browser's console
- This will take about 10 seconds. if you set the Chrome's logging level to Verbose, there is a warning message that will be repeated each time the field is repeated, this is convenient as it will show you the progress of the 460 additions
At this point, saving will take about 1.5 minutes with so empty fields but 5 minutes with the customer's structure, which is more complex. CPU usage will increase as well as the portal's memory usage. The process will eventually complete successfully.
Web content not spending so much time and resources upon being saved
Reproduced on 7.0.x @ cb85cbd7c9297372e5c7ad605f5487d93bc6af3e
Not reproducible on 7.1.x @ 3bacfac64d004d67d833cdcab7f168b60031ca78
Saving/Editing web content only takes about 5 seconds.
The attached thread dumps are taken 10-15 seconds apart from each other, they all show the longest stack to be: