Problem/Motivation

I investigate why our view with many dates needs so much time. And I saw that
\Drupal\Core\Datetime\DateFormatter::dateFormat via \Drupal\Core\Datetime\DateFormatter::format was called very often.

\Drupal\smart_date\SmartDateTrait use \Drupal\Core\Datetime\DateFormatter::format.

\Drupal\Core\Datetime\DateFormatter::dateFormat is called when it is not type custom.
, but \Drupal\smart_date\SmartDateTrait set this to empty string, which results into unnecessary calls.

See attached screenshots, before and after the fix.

Steps to reproduce

-

Proposed resolution

Set missing date time type to custom.

Remaining tasks

-

User interface changes

-

API changes

-

Data model changes

-

Issue fork smart_date-3519986

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

tobiasb created an issue. See original summary.

tobiasb’s picture

StatusFileSize
new208.5 KB
tobiasb’s picture

Title: Set missing datetime type » Set missing date format type

tobiasb’s picture

Assigned: tobiasb » Unassigned
Status: Active » Needs review