Affects Version/s: 6.2.X EE, 7.0.X EE, Master
Too many database queries are run when visiting a page with an Announcements portlet as a logged in user. This can cause performance issues.
Steps to Reproduce
- Start Liferay and log in as the admin user.
- Add the announcements portlet to the home page.
- Click on the top-right corner tri-dot icon of the announcements portlet and go to Configuration.
- Under "Announcements Displayed", uncheck the box that says "Customize Announcements Displayed".
- Navigate to Control Panel > Server Administration > Scripts, and run the attached addManySites groovy script.
- Revisit the home page while still logged in. Monitor the db queries that are being run as the home page loads.
Expected Results: There will be only be a few queries that are run.
Actual Results: There are over twice as many queries as there are sites. This may lead to performance issues.