Move 'type' .info.yml file property first for performance (lead by example)

Created on 3 March 2014, over 10 years ago
Updated 30 January 2023, over 1 year ago

Objective

  1. ExtensionDiscovery can detect the type of an extension faster, if the 'type' property is declared first.
  2. It is not required to declare the 'type' property first.
  3. Most developers are following what core is doing, so we can slightly improve performance by simply leading by example.

Proposed solution

  1. Change all .info.yml files in core to declare the 'type' property first.

  2. While being there, let's also standardize the three required .info.yml file properties to be consistently declared first + in this order:

    type: module
    core: 8.x
    name: Foo
    ...
    

This can be scripted. For the sake of retaining potential comments, intentionally not using a YAML parser/dumper.

πŸ“Œ Task
Status

Needs work

Version

10.0 ✨

Component
ExtensionΒ  β†’

Last updated 3 days ago

No maintainer
Created by

πŸ‡©πŸ‡ͺGermany sun Karlsruhe

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

    It affects performance. It is often combined with the Needs profiling tag.

  • needs profiling

    It may affect performance, and thus requires in-depth technical reviews and profiling.

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.

  • The Needs Review Queue Bot β†’ tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide β†’ to find step-by-step guides for working with issues.

Production build 0.69.0 2024