This code can't really be right, as it get's all relationship handlers twice, so this seems to be an algorithm N^2

<?php
  // Get relationship labels
  $relationships = array();
  foreach ($display->handler->getHandlers('relationship') as $id => $handler) {
    $relationships[$id] = $handler->label();
    $handlers = $display->handler->getOption('relationships');
    if ($handlers) {
      foreach ($handlers as $id => $info) {
        $handler = $display->handler->getHandler('relationship', $id);
        $relationships[$id] = $handler->label();
      }
    }
  }
?>
CommentFileSizeAuthor
#3 views-1767180-3.patch1.29 KBtim.plunkett
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sphism’s picture

Issue summary: View changes

Updated issue summary.

sphism’s picture

Status: Needs review » Active

Just updating this issue, seems that the camelCase methods have been changed

includes/admin.inc line 3390

...

[edit:] Whoops, I was looking at an older version of views 8.x ... methods are now camelCase

tim.plunkett’s picture

@sphism You're looking at D7 code. This is for D8.

tim.plunkett’s picture

Status: Active » Needs review
FileSize
1.29 KB

Yep, I confirmed this works, and cleaned up the other instances.

dawehner’s picture

Status: Active » Reviewed & tested by the community

This looks perfect.
In the longrun it would make sense to have tests for this as well.

tim.plunkett’s picture

Status: Reviewed & tested by the community » Fixed

Agreed, though it wouldn't have failed tests, since it was producing the correct results, just VERY SLOWLY.

http://drupalcode.org/project/views.git/commit/8dbabdd

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Updated issue summary.