Project

General

Profile

Actions

Bug(バグ) #1556

open

[api][optimization] /people/{guid}/{group}?filterBy=hasApp のパフォーマンスが良くない

Added by Shogo Kawahara over 14 years ago. Updated over 13 years ago.

Status:
New(新規)
Priority:
Normal(通常)
Assignee:
-
Target version:
Start date:
2010-09-06
Due date:
% Done:

0%

Estimated time:
3.6 で発生するか:
[QA]バグ通知済:
No
3.8 で発生するか:

Description

Overview

/people/{guid}/{group}?filterBy=hasApp のパフォーマンスが良くない

  • 現状、以下のような抽出を一度行なっているため、アプリ所有者数か抽出済みメンバー数が多ければ多いほど処理時間・メモリ使用量が多くなる

lib/util/opJsonDbOpensocialService.class.php

($ids は member_id の配列で、事前に別の条件でフィルタリングされている)

        $memberApplications = Doctrine::getTable('MemberApplication')->createQuery()
          ->where('application_id = ?', $token->getAppId())
          ->execute();
        if (count($memberApplications))
        {   
          $ids = array_intersect($ids, $memberApplications->toKeyValueArray('id', 'member_id'));
        }   
        else
        {   
          $ids = array();
        }   
<pre>

* 取得メンバーが1人の時は、上記のような処理をやる必要はない。(そのメンバーがアプリを所有しているか調べるだけで良い)

Actions #1

Updated by Shogo Kawahara about 14 years ago

  • Target version changed from 1.3.0 to 1.3.1
Actions #2

Updated by Shogo Kawahara about 14 years ago

  • Target version changed from 1.3.1 to 1.3.2
Actions #3

Updated by Shogo Kawahara over 13 years ago

  • Target version changed from 1.3.2 to 1.3.3
  • [QA]バグ通知済 set to No
Actions

Also available in: Atom PDF