microsoftgraph / microsoftgraph/msgraph-sdk-python

The first request is very slow

オープン
#909 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

status:needs-discussion
主要言語
Python
スター
630
フォーク
96
平均マージ
15時間 20分
マージ済み PR(30日)
3

説明

Not sure if performance is a feature request or bug.

import win32gui
from azure.identity.broker import InteractiveBrowserBrokerCredential
from msgraph.graph_service_client import GraphServiceClient

1.1s (Already in issue #904)

current_window_handle = win32gui.GetForegroundWindow()
credentials = InteractiveBrowserBrokerCredential(
    tenant_id=tenant,
    client_id=client_id,
    use_default_broker_account=True,
    parent_window_handle=current_window_handle,
)

0.0s (Expected)

client = GraphServiceClient(
    credentials=credentials,
    scopes=[]
)

0.4s (Slower than I would expect)

await client.me.get()

2.2s (1st request. This is significantly slower than I would expect)

await client.me.get()

0.1s (2nd request. Expected)

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

リポジトリのファイルやテストは指定されていません。示されている Python の import と GraphServiceClient のシーケンスを使って問題を再現し、その後、1 回目と 2 回目の await client.me.get() 呼び出しを比較してください。追加される最初のリクエストのレイテンシーの原因を特定して対処し、回帰チェックで動作を検証できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
azure, python
領域
api, performance
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。