Automaticly generate Performance improvements needed after Refactor node properties to multilingual

Created on 26 May 2013, almost 12 years ago
Updated 18 March 2025, 25 days ago

Follow up for #1498674: Refactor node properties to multilingual

Postponed on

Problem/Motivation

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.

Proposed resolution

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.

Remaining tasks

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.

User interface changes

None.

API changes

None.

Original report in issue summary of #1498674: Refactor node properties to multilingual

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.

📌 Task
Status

Postponed: needs info

Version

11.0 🔥

Component

node system

Created by

🇺🇸United States yesct

Live updates comments and jobs are added and updated live.
  • D8MI

    (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.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024