Domain Config loading is resource intensive

Created on 10 September 2021, over 3 years ago
Updated 28 November 2024, 28 days ago

I defined 83 domains and 3 alias for each domain. After this definition, a 20-second slowdown occurred in the first load after cache cleaning. In addition, there was a significant slowdown in circulation between pages. Even adding a new paragraph to the page made it wait. The modules I set up for the domain were as follows.

  • domain,
  • country_path,
  • domain_access,
  • domain_alias,
  • domain_config,
  • domain_config_ui,
  • domain_content,
  • domain_source,
  • domain_menus,
  • domain_path,
  • domain_path_pathauto,
  • domain_site_settings,
  • domain_theme_switch

I noticed that when I remove the storage->listAll('domain.config.') code in domain/domain_config/src/DomainConfigOverrider.php it speeds up.

I noticed that the Url::fromUserInput line in the domain/domain_source/src/HttpKernel/DomainSourcePathProcessor.php file also slows it down a lot. I eliminated the speed problem by having the Entities here only from $options['entity'].

As a result of these processes, I tested the following domains as multilingual, and saw that there was no problem and my speed problem was solved.
- educ.example.com
- test.example.com
- example.com
- example.com/faculty
- example.com/university

πŸ“Œ Task
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡ΉπŸ‡·Turkey seyfettinkahveci

Live updates comments and jobs are added and updated live.
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.

  • First commit to issue fork.
  • @dtfabio opened merge request.
  • πŸ‡§πŸ‡ͺBelgium dtfabio Ninove

    Hi everyone,

    We are using the patch β€˜3232343-2-domain_source_performance_fix.patch’ in production currently and so I tried to re-roll the patch from seyfettinkahveci to the 2.0.x version of the module and created an MR for this.

    Apparently, something did go wrong which meant that not all the modifications from the 2.0.x were present. I tried to fix this, but noticed that something is still not correct.

    I will adjust this and pay better attention to prevent this kind of thing in the future.

    Greetings,

    Fabio

  • πŸ‡§πŸ‡ͺBelgium dtfabio Ninove
Production build 0.71.5 2024