Skip to content

[5.x]: Performance issues in element index when entry thumb is displayed #14760

@thupsi

Description

@thupsi

What happened?

Description

When navigating to an entry index with entry thumbs enabled (via the entry type settings) performance is abnormaly slow.

Testing parameters

Structure with 154 entries, 76 of them with thumbnail, display mode "structured table" (plain table is about the same, cards is even slower)

Performance of "get-elements" action:

No thumbnails:
Processing time: 293 ms
Peak memory: 6.386 MB
Query count: 134

With thumbnails:
Processing time: 1,824 ms
Peak memory: 32.676 MB
Query count: 555

And now for a surprise...
"With thumbnails" but also with an additional column showing the same image thumbnail:
Processing time: 465 ms
Peak memory: 9.988 MB
Query count: 374

Comments

  • The "with thumbnails" timings are about 6x of "no thumbnails"
  • The "with thumbnails" timings are much lower when a column with the same image is added to the table. This clearly demonstrates that something fishy is going on!

Craft CMS version

5.0.1

PHP version

8.3.2

Operating system and version

No response

Database type and version

MySQL 8.0.33

Image driver and version

Imagick 3.7.0 (ImageMagick 6.9.11-60)

Installed plugins and versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions