Follow up for #1498674: Refactor node properties to multilingual →
There was not much room for optimization in #1498674: Refactor node properties to multilingual → .
However the following issues make it possible to do some optimization:
They open up the possibility for an interesting proposed resolution.
Performance regressions in 1498674 effected both single language sites and sites with multiple languages. The proposed improvements here will confine the performance regression to multilingual environments, improving (restoring) single language site performance.
Once the SQL storage is under the full control of the entity system we can automatically alter primary keys and queries depending on whether we are in a monolingual or multilingual environment. We have a couple of recurring patterns to switch from a monolingual query to a multilingual one, which should not be hard to automate.
Drop composite primary key and set it to just nid as primary key making the monolingual query, for example:
SELECT title FROM {node_field_data} WHERE status = 1 AND promote = 1 ORDER BY created
as performant as HEAD was before 1498674.
Open follow-ups for each performance improvement that is not automated.
Consider doing a meta which would have an issue for each query.
Identify the patterns. List examples.
Automate (write a script to use the patterns identified and change the code?) the improvements.
None.
None.
there is not much room for optimization in this issue, however #1497374: Switch from Field-based storage to Entity-based storage → , the contextual conversion of entity queries to EFQ2 and #1498720: [meta] Make the entity storage system handle changes in the entity and field schema definitions → open up for some interesting scenario: once the SQL storage is under the full control of the entity system we can automatically alter primary keys and queries depending on whether we are in a monolingual or multilingual environment. We have a couple of recurring patterns to switch from a monolingual query to a multilingual one, which should not be hard to automate. This would let us confine the performance regression to multilingual environments, which should be a fair compromise.
Postponed: needs info
11.0 🔥
node system
(Drupal 8 Multilingual Initiative) is the tag used by the multilingual initiative to mark core issues (and some contributed module issues). For versions other than Drupal 8, use the i18n (Internationalization) tag on issues which involve or affect multilingual / multinational support. That is preferred over Translation.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.