There are several issues related to embedded portlets and portlet preferences
- Currently embedded portlets use portlet preferences with ownerType LAYOUT
- We use portlet preferences to check if portlet is on a page or not
- We create portlet preferences whenever we ask to getPreferences (non-strict methods)
- Developers often exchange preferences strict/non-strict methods to read preferences, which side effect is creating of those preferences
This is causing performance issues, confuses developers, leads to security issues and seems to be long-term unstable solution.
Some discussion references: