From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id F3A439413CB for ; Thu, 3 Aug 2023 11:05:53 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=xCR/EoNxc6wYxn7u1wKZZ8ehjT4UUmY5qJdg2ZIMB28=; c=relaxed/simple; d=groups.io; h=From:To:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Thread-Index:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding:Content-Language; s=20140610; t=1691060752; v=1; b=n1VcSJjLcFF9sHC3YdYG9eShreqemGMyKXG8lKyJi3qgbjRijMipCeR5CR2gvC/LcLd843N3 Jzy2VOvoVSZjxmBAwP54jVBCs7i+QAQb2A8wtha1HcNrija2ycg333c5L/pG3sz2kYoIBYE0xW0 3Ylp0ZxKvAhIwVfqvAdHbEkA= X-Received: by 127.0.0.2 with SMTP id ieLtYY7687511xOGErohQnPN; Thu, 03 Aug 2023 04:05:52 -0700 X-Received: from zrleap.intel-email.com (zrleap.intel-email.com [114.80.218.36]) by mx.groups.io with SMTP id smtpd.web11.12012.1691060751257334684 for ; Thu, 03 Aug 2023 04:05:52 -0700 X-Received: from zrleap.intel-email.com (localhost [127.0.0.1]) by zrleap.intel-email.com (Postfix) with ESMTP id B1827A32E05B for ; Thu, 3 Aug 2023 19:05:46 +0800 (CST) X-Received: from localhost (localhost [127.0.0.1]) by zrleap.intel-email.com (Postfix) with ESMTP id 8EAFEA32E02F for ; Thu, 3 Aug 2023 19:05:46 +0800 (CST) X-Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by zrleap.intel-email.com (Postfix) with SMTP id D514FA32E123 for ; Thu, 3 Aug 2023 19:05:42 +0800 (CST) X-Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Thu, 03 Aug 2023 19:05:39 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming via groups.io" To: "'Bi, Dandan'" , "'Dong, Eric'" , References: <20230731004606.1740-1-dandan.bi@intel.com> <003b01d9c4ff$4a6f8f30$df4ead90$@byosoft.com.cn> In-Reply-To: Subject: =?UTF-8?B?W2VkazItZGV2ZWxdIOWbnuWkjTogW1BBVENIIHYyXSBNZGVNb2R1bGVQa2cvU2V0dXBCcm93c2VyOiBMb2FkIHN0b3JhZ2UgdmlhIEdldFZhcmlhYmxlIGZvciBFZmlWYXJTdG9yZQ==?= Date: Thu, 3 Aug 2023 19:05:39 +0800 Message-ID: <000101d9c5fa$6fe9cef0$4fbd6cd0$@byosoft.com.cn> MIME-Version: 1.0 Thread-Index: AQL/K4pml0+M9gQc8lw6vsr1Gju1fwI9FuqxAgzjN0sBkX+rcq1ewfeQ Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,gaoliming@byosoft.com.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: lN6eUSu334ccePtCx95tahFlx7686176AA= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=n1VcSJjL; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Reviewed-by: Liming Gao > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: Bi, Dandan > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2023=E5=B9=B48=E6=9C=883=E6=97=A5 1= 2:53 > =E6=94=B6=E4=BB=B6=E4=BA=BA: Gao, Liming ; Dong= , Eric > ; devel@edk2.groups.io > =E4=B8=BB=E9=A2=98: RE: [PATCH v2] MdeModulePkg/SetupBrowser: Load storag= e via > GetVariable for EfiVarStore >=20 > Hi Liming, >=20 > Yes, with this change, the performance is better than before. > Especially for the big formset with lots of configuration, it has better = use > experience when loading the formset to display. >=20 > Could you help review this patch? Thanks. >=20 >=20 > Thanks, > Dandan > -----Original Message----- > From: gaoliming > Sent: Wednesday, August 2, 2023 1:08 PM > To: Dong, Eric ; Bi, Dandan ; > devel@edk2.groups.io > Subject: =E5=9B=9E=E5=A4=8D: [PATCH v2] MdeModulePkg/SetupBrowser: Load s= torage via > GetVariable for EfiVarStore >=20 > Dandan: > Have you collected the performance data for this enhancement? Is the > updated one better than before? >=20 > Thanks > Liming > > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > > =E5=8F=91=E4=BB=B6=E4=BA=BA: Dong, Eric > > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2023=E5=B9=B47=E6=9C=8831=E6=97= =A5 13:04 > > =E6=94=B6=E4=BB=B6=E4=BA=BA: Bi, Dandan ; devel@ed= k2.groups.io > > =E6=8A=84=E9=80=81: Gao, Liming > > =E4=B8=BB=E9=A2=98: RE: [PATCH v2] MdeModulePkg/SetupBrowser: Load stor= age via > > GetVariable for EfiVarStore > > > > Reviewed-by: Eric Dong > > > > -----Original Message----- > > From: Bi, Dandan > > Sent: Monday, July 31, 2023 8:46 AM > > To: devel@edk2.groups.io > > Cc: Gao, Liming ; Dong, Eric > > > > Subject: [PATCH v2] MdeModulePkg/SetupBrowser: Load storage via > > GetVariable for EfiVarStore > > > > For EfiVarStore (EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER), it will call > > ExtractConfig-GetVariable-HiiBlockToConfig-ConfigToBlock when load > > storage value in LoadStorage function. It's not necessary and costs > > lots of time > to do > > the conversion between config and block. > > So now enhance it to call GetVariable directly. > > > > Cc: Liming Gao > > Cc: Eric Dong > > Signed-off-by: Dandan Bi > > --- > > v2: Fix coding style issue. > > > > .../Universal/SetupBrowserDxe/Setup.c | 54 > +++++++++++-------- > > 1 file changed, 32 insertions(+), 22 deletions(-) > > > > diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c > > b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c > > index 5158baf5bd..2f7b11b1aa 100644 > > --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c > > +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c > > @@ -5634,32 +5634,42 @@ LoadStorage ( > > ConfigRequest =3D Storage->ConfigRequest; > > } > > > > - // > > - // Request current settings from Configuration Driver > > - // > > - Status =3D mHiiConfigRouting->ExtractConfig ( > > - mHiiConfigRouting, > > - ConfigRequest, > > - &Progress, > > - &Result > > - ); > > - > > - // > > - // If get value fail, extract default from IFR binary > > - // > > - if (EFI_ERROR (Status)) { > > - ExtractDefault (FormSet, NULL, EFI_HII_DEFAULT_CLASS_STANDARD, > > FormSetLevel, GetDefaultForStorage, Storage->BrowserStorage, TRUE, > > TRUE); > > - } else { > > + if (Storage->BrowserStorage->Type =3D=3D > > + EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER) { > > // > > - // Convert Result from to > > + // Call GetVariable directly for EfiVarStore > > // > > - StrPtr =3D StrStr (Result, L"&GUID=3D"); > > - if (StrPtr !=3D NULL) { > > - *StrPtr =3D L'\0'; > > + Status =3D gRT->GetVariable (Storage->BrowserStorage->Name, > > &(Storage->BrowserStorage->Guid), NULL, (UINTN > > *)(&(Storage->BrowserStorage->Size)), > > Storage->BrowserStorage->EditBuffer); > > + if (EFI_ERROR (Status)) { > > + ExtractDefault (FormSet, NULL, > > EFI_HII_DEFAULT_CLASS_STANDARD, > > + FormSetLevel, GetDefaultForStorage, Storage->BrowserStorage, TRUE, > > + TRUE); > > } > > + } else { > > + // > > + // Request current settings from Configuration Driver > > + // > > + Status =3D mHiiConfigRouting->ExtractConfig ( > > + mHiiConfigRouting, > > + ConfigRequest, > > + &Progress, > > + &Result > > + ); > > > > - Status =3D ConfigRespToStorage (Storage->BrowserStorage, Result); > > - FreePool (Result); > > + // > > + // If get value fail, extract default from IFR binary > > + // > > + if (EFI_ERROR (Status)) { > > + ExtractDefault (FormSet, NULL, > EFI_HII_DEFAULT_CLASS_STANDARD, > > FormSetLevel, GetDefaultForStorage, Storage->BrowserStorage, TRUE, > > TRUE); > > + } else { > > + // > > + // Convert Result from to > > + // > > + StrPtr =3D StrStr (Result, L"&GUID=3D"); > > + if (StrPtr !=3D NULL) { > > + *StrPtr =3D L'\0'; > > + } > > + > > + Status =3D ConfigRespToStorage (Storage->BrowserStorage, Result)= ; > > + FreePool (Result); > > + } > > } > > > > Storage->BrowserStorage->ConfigRequest =3D AllocateCopyPool (StrSize > > (Storage->ConfigRequest), Storage->ConfigRequest); > > -- > > 2.39.1.windows.1 >=20 >=20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107532): https://edk2.groups.io/g/devel/message/107532 Mute This Topic: https://groups.io/mt/100523536/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-