From cb01653d7740b691dbef007ab759a1f3806a9540 Mon Sep 17 00:00:00 2001 From: Kenichiro NOGI Date: Fri, 11 Sep 2026 14:26:56 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20runExportFlow/runGetFlow=E3=81=ABAPI?= =?UTF-8?q?=E9=80=9A=E4=BF=A1=E3=83=BB=E6=9B=B8=E8=BE=BC=E5=87=A6=E7=90=86?= =?UTF-8?q?=E3=81=AE=E5=8C=BA=E9=96=93=E8=A8=88=E6=B8=AC(Timer)=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Export方式の処理時間がGet方式より長い件を調査するため計測を追加。 結果、ボトルネックはAPI通信側(サーバー処理)でパース・書込処理ではないと判明したため、今後の検証用に計測コードは残す。 --- .../vba-files/Module/Module1.bas | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/XVBA/新版着工要因閲覧シート/vba-files/Module/Module1.bas b/XVBA/新版着工要因閲覧シート/vba-files/Module/Module1.bas index 919de8e7..713b3359 100644 --- a/XVBA/新版着工要因閲覧シート/vba-files/Module/Module1.bas +++ b/XVBA/新版着工要因閲覧シート/vba-files/Module/Module1.bas @@ -59,15 +59,21 @@ End Sub 'TrueAf[^擾łȂꍇFalseԂ Function runExportFlow() As Boolean Dim resData As Variant + Dim t0 As Double, t1 As Double, t2 As Double Debug.Print "f[^擾JniExportj" + t0 = Timer resData = exportCSVData(tableId) + t1 = Timer + Debug.Print " exportCSVData(APIʐM) v: " & Format(t1 - t0, "0.000") & "b" If IsEmpty(resData) Or resData = "" Then Debug.Print "f[^擾ł܂ł" runExportFlow = False Else Call exportCSVDataToSheet(resData, tableId & "E") + t2 = Timer + Debug.Print " exportCSVDataToSheet(p[X+) v: " & Format(t2 - t1, "0.000") & "b" runExportFlow = True End If End Function @@ -77,9 +83,13 @@ End Function 'TrueAf[^擾łȂꍇFalseԂ Function runGetFlow() As Boolean Dim records As Collection + Dim t0 As Double, t1 As Double, t2 As Double Debug.Print "f[^擾JniGetj" + t0 = Timer Set records = getRecordsData(tableId) + t1 = Timer + Debug.Print " getRecordsData(APIʐM) v: " & Format(t1 - t0, "0.000") & "b" If records Is Nothing Then Debug.Print "f[^擾ł܂ł" @@ -89,6 +99,8 @@ Function runGetFlow() As Boolean runGetFlow = False Else Call getRecordsDataToSheet(records, tableId & "G") + t2 = Timer + Debug.Print " getRecordsDataToSheet() v: " & Format(t2 - t1, "0.000") & "b" runGetFlow = True End If End Function