Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
i18nstrings_get_source() executes a query similar to this one:
SELECT s.*, i.type, i.oid, i.property FROM {locales_source} s LEFT JOIN {i18n_strings} i ON s.lid = i.lid WHERE s.textgroup = S AND s.location = S
I.e., it filters the {locales_source} table on on the textgroup and location (type:oid:property) fields. However, core locale module doesn't define an index for those fields, which is causing massive slowdowns the larger the {locales_source} table grows. We noticed about 300-400 msec execution time *per query* (there can be many of them during a single request) on a very heavy {locales_source} table with ~45K entries.
Comment | File | Size | Author |
---|---|---|---|
i18n-DRUPAL-6--1.index_.patch | 2.07 KB | sun |
Comments
Comment #1
Jose Reyero CreditAttribution: Jose Reyero commentedGood idea, and I see you've taken care of all details in your patch.
Thanks a lot.