Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Our next available supporter will start replying to tickets in about 0.13 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Europe/Kyiv (GMT+03:00)

This topic contains 9 replies, has 2 voices.

Last updated by Andrey 6 months, 1 week ago.

Assisted by: Andrey.

Author Posts
February 26, 2024 at 11:49 am #15343937

richardL-34

Currently WPML does not follow the guideliens from composer to optimize autoloader performance. Especially on large sites with lot of files in the project, the "classmap-authoritative" brings a huge performance boost, but could not be enabled, because WPML does not load all classes with Class Maps.

On some of our large sites running, the autoload uses up to 20 to 30 percentage of php execution time. If all plugins and themes uses the optimized composer configuration a file scan from autoloader would be not required and the performance would be impoved. Because all plugins and themes has to be updated, to get the full potential, it might not be a quick win, but a long term performance improvement.

Would it be possible, that you integrate this flag in you build, to get better performance on our sites?

Thank you for your help!

With best regards,
Richard Liebmann

February 26, 2024 at 6:39 pm #15345850

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Hello Richard,

Thank you for contacting WPML support. Could you please provide more information about the guidelines we don't follow? Is there any official documentation? Are you encountering any fatal errors because of WPML?

The more specific information I have, the better I can provide it to the team.

February 27, 2024 at 6:19 am #15347226

richardL-34

Hi Andrey,

thank you for your response. A guideline is descripte in the composer documentation (e.g. hidden link). WPML does not follow optimization level 2.

Thank you for your help!

February 27, 2024 at 3:46 pm #15349946

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for your feedback. Can you provide more details about the issues you are experiencing with enabling an Authoritative class maps? If you encounter any WPML-related errors, please share them with me.

March 1, 2024 at 6:02 am #15360933

richardL-34

Hi Andrey,

thank you for your replay! The problem is a performance problem. If one composer autoloader in a wordpress project does not follow the optimization level 2, the performance problem still exists. This uses about 40% PHP execution time on a complex page with lots of plugins.

We have already optimized or replaced other plugins, but if this is not possible with wpml we do not get the performance benefits.

Thank you for your help!

March 2, 2024 at 9:37 am #15365512

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for your feedback. I understand the purpose of this optimization and why you want to achieve this. I would like to clarify where you see that WPML does not follow this and if there is any error because of WPML the moment you try to enable this.

Please share the code or other relevant things that could elaborate on this.

March 6, 2024 at 1:55 pm #15379766

richardL-34

Hi Andrey,

thank you for your response. In the WPML extension, the composer.json file should include the option "classmap-authoritative": true as mentioned in the composer documentation mentioned above. This disables the autoloader file search, which results in high cpu and time cost on pages with lots of files and folders (the example in the uses about 0,5 secounds from 1,2secounds page load time).

The change need to be done in the source of autoloader, to have a high performance page with wpml.

Thank you for your help!

With best regards,
Richard Liebmann

Screenshot 2024-03-06 145315.png
March 7, 2024 at 9:35 am #15383037

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for sharing the details. I will consult our team and update you once I have any news.

March 12, 2024 at 3:24 pm #15400331

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for bringing this issue to our attention. I have reported it to our development team for verification. Although I cannot provide you with an exact date for when it will be addressed or fixed, or if it will be fixed, please be assured that the issue has been added to our team's list.

I will keep you updated here with any news regarding the status of this issue, even if support is closed. Thank you once again for reporting this to us.

March 14, 2024 at 9:13 am #15408359

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Hi Richard,

Could you provide us with a copy of your website so we can compare the benefits of using "authoritative" in your example? To do this, you need to install a "Duplicator" (https://wordpress.org/plugins/duplicator/) plugin on your site temporarily. This plugin will allow you to create a copy of your site and its content. Once you have made the snapshot, you can send me the installer file and the zipped package you downloaded for me to review.

Please note that the following message is private.

The topic ‘[Closed] Optimize Autoloader configuration’ is closed to new replies.