Performance problem

Created on 11 September 2018, almost 6 years ago
Updated 12 June 2024, 14 days ago

Problem/Motivation

The first load of the filter, loads all entities. If you put a field that is referenced from a node, you will have a extreme performance problems with a large number of nodes.

Proposed resolution

Avoid loading all entities if you don't set the bundle first.

Remaining tasks

The feature request could be done in a better way but its a quick patch.

User interface changes

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain jtriguero

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.

  • When there is a lot of published content the view fails when trying to load everything.
    The option that worked for me was to temporarily remove the function getValueOptions() from the /src/Plugin/views/filter/EntityReference.php file.
    In this way the options are not loaded and it does not give an error, however it allows you to select the Target entity bundle and in this way you can filter without problem

  • πŸ‡­πŸ‡ΊHungary tikaszvince

    Attach updated patch for version 2.0.1 β†’

  • πŸ‡©πŸ‡ͺGermany ChristianAdamski Berlin, Germany
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.1.x + Environment: PHP 8.2 & MySQL 8
    last update about 1 year ago
    2 fail
  • #26 worked for me on 2X version
    even if I had to apply it manually (my mistake?)

  • πŸ‡ΊπŸ‡ΈUnited States caspervoogt

    I was able to apply the patch from #26 (via composer.json). Performance seems OK but I hope a few others can test that as well.

  • πŸ‡¦πŸ‡ΊAustralia jnlar Sydney, Australia

    I can confirm #26 also works, note that there's 2 tests failing however. Not sure on their relevance to this issue.

  • πŸ‡ΊπŸ‡ΈUnited States xeiro

    Confirmed #26 patch applied to 10.1.8 using drupal/verf ^2.0 version for me.

  • πŸ‡ΊπŸ‡ΈUnited States brooke_heaton

    The latest patch isn't resolving the fundamental performance problems for me. The views plugin still appears to try to load WAY WAY too many entities. In my case I'm using nodes referenced on a Paragraph that uses a Relationship. What DOES work for me is to comment out the getValueOptions() function entirely when developing locally. I think the plugin has some fundamental problems that aren't addressed here. Definitely needs a lot more work.

  • πŸ‡ΊπŸ‡ΈUnited States sassafrass

    Confirming that the latest patch fixed the issue for me.

  • Status changed to Needs review 14 days ago
  • πŸ‡¬πŸ‡·Greece vensires

    Since this is a really big issue when first trying to install the module and the patch from #26 actually solves it I set it as "Needs review".

    As for the considerations mentioned in #32, I think that it there is something more to address, it should be done in a follow-up issue.
    But what do the rest of you believe?

Production build 0.69.0 2024