Problem/Motivation

#501428: Date and time field type in core included some code to load date formats from configuration, which has been ported around since. It means two config entity loads + cache sets on every cold cache request.

Steps to reproduce

Proposed resolution

Going to see what happens if we remove it.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3587601

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

catch created an issue. See original summary.

catch’s picture

Status: Active » Needs review

So we need to add defaults in the element callbacks, but otherwise this works fine. Can see the difference in performance tests.

dcam’s picture

Status: Needs review » Needs work

I left several comments on the MR. There are a couple of optional code style changes. But I saw inconsistency in checking for NULL entity loads. I'm not sure if I'm missing something about the code that makes the checks unnecessary. If I did then I apologize.

catch’s picture

Status: Needs work » Needs review

Made changes based on some of the feedback and answered the rest I think.