Created on 5 October 2024, about 1 month ago

views_aggregator_functions.inc has this block of code inside the function views_aggregator_views_aggregation_functions_info() which has been there since the initial commit (bf6af5fc) of the D8 port in 2017:

  // Caution: experiment!
  if (FALSE) {
    // For each group remove cells that are identical to the the ones above
    // them in the same group.
    foreach ($groups as $group_value => &$rows) {
      $first_row = NULL;
      foreach ($rows as $num => &$row) {
        if (!isset($first_row)) {
          $first_row = $row;
        }
        else {
          foreach ((array) $row as $field_name => $cell) {
            if ($field_name != '_field_data' && $cell == $first_row->{$field_name}) {
              unset($row->{$field_name});
            }
          }
        }
      }
    }
  }

Obviously, this is not doing anything, and since everything has been essentially working for the past 7 years it's not needed for the proper operation of this module. So removing it shouldn't harm anything, but if this would add a noticeable improvement I'd like to uncomment it, write a test, and allow the module to benefit from this "experiment".

@JordiK: I assigned this to you to get your attention / opinion. I did not work on this code block so I don't know what your intention was for leaving this in during the D7->D8 port.

πŸ“Œ Task
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States tr Cascadia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024