Re: [edk2] [PATCH 2/2] BaseTools/GenFds: speed up Region.PadBuffer()

2016-07-12 Thread Gao, Liming
Got it. Thanks for your quick fix. From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Laszlo Ersek Sent: Tuesday, July 12, 2016 10:18 PM To: Gao, Liming ; Ard Biesheuvel Cc: edk2-devel-01 Subject: Re: [edk2] [PATCH 2/2] BaseTools/GenFds: speed up Region.PadBuffer() On 07

Re: [edk2] [PATCH 2/2] BaseTools/GenFds: speed up Region.PadBuffer()

2016-07-12 Thread Laszlo Ersek
Laszlo Ersek [mailto:ler...@redhat.com] > *Sent:* Tuesday, July 12, 2016 10:04 PM > *To:* Ard Biesheuvel > *Cc:* Gao, Liming ; edk2-devel-01 > > *Subject:* Re: [edk2] [PATCH 2/2] BaseTools/GenFds: speed up > Region.PadBuffer() > > > > On 07/12/16 15:53, Ard Biesheuve

Re: [edk2] [PATCH 2/2] BaseTools/GenFds: speed up Region.PadBuffer()

2016-07-12 Thread Gao, Liming
Will you verify the generated file is the expected one? Thanks Liming From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Tuesday, July 12, 2016 10:04 PM To: Ard Biesheuvel Cc: Gao, Liming ; edk2-devel-01 Subject: Re: [edk2] [PATCH 2/2] BaseTools/GenFds: speed up Region.PadBuffer() On 07/12/16

Re: [edk2] [PATCH 2/2] BaseTools/GenFds: speed up Region.PadBuffer()

2016-07-12 Thread Laszlo Ersek
On 07/12/16 15:53, Ard Biesheuvel wrote: > On 12 July 2016 at 15:50, Ard Biesheuvel wrote: >> On 12 July 2016 at 15:48, Laszlo Ersek wrote: > [...] >>> In commit bd907fb6386560e621112beca7b7d381d0003967, I used the >>> string.join() method, but I forgot to set the separator to the empty string. >

Re: [edk2] [PATCH 2/2] BaseTools/GenFds: speed up Region.PadBuffer()

2016-07-12 Thread Ard Biesheuvel
On 12 July 2016 at 15:50, Ard Biesheuvel wrote: > On 12 July 2016 at 15:48, Laszlo Ersek wrote: [...] >> In commit bd907fb6386560e621112beca7b7d381d0003967, I used the >> string.join() method, but I forgot to set the separator to the empty string. >> >> https://docs.python.org/2/library/string.ht

Re: [edk2] [PATCH 2/2] BaseTools/GenFds: speed up Region.PadBuffer()

2016-07-12 Thread Ard Biesheuvel
On 12 July 2016 at 15:48, Laszlo Ersek wrote: > On 07/12/16 15:34, Laszlo Ersek wrote: >> On 07/12/16 15:28, Ard Biesheuvel wrote: >>> On 12 July 2016 at 13:21, Laszlo Ersek wrote: On 07/12/16 10:39, Laszlo Ersek wrote: > On 07/12/16 07:18, Gao, Liming wrote: >> Laszlo: >> This

Re: [edk2] [PATCH 2/2] BaseTools/GenFds: speed up Region.PadBuffer()

2016-07-12 Thread Laszlo Ersek
On 07/12/16 15:34, Laszlo Ersek wrote: > On 07/12/16 15:28, Ard Biesheuvel wrote: >> On 12 July 2016 at 13:21, Laszlo Ersek wrote: >>> On 07/12/16 10:39, Laszlo Ersek wrote: On 07/12/16 07:18, Gao, Liming wrote: > Laszlo: > This patch serial is good. It will improve GenFds performan

Re: [edk2] [PATCH 2/2] BaseTools/GenFds: speed up Region.PadBuffer()

2016-07-12 Thread Laszlo Ersek
On 07/12/16 15:28, Ard Biesheuvel wrote: > On 12 July 2016 at 13:21, Laszlo Ersek wrote: >> On 07/12/16 10:39, Laszlo Ersek wrote: >>> On 07/12/16 07:18, Gao, Liming wrote: Laszlo: This patch serial is good. It will improve GenFds performance if there are more padding in FD regio

Re: [edk2] [PATCH 2/2] BaseTools/GenFds: speed up Region.PadBuffer()

2016-07-12 Thread Ard Biesheuvel
On 12 July 2016 at 13:21, Laszlo Ersek wrote: > On 07/12/16 10:39, Laszlo Ersek wrote: >> On 07/12/16 07:18, Gao, Liming wrote: >>> Laszlo: >>> This patch serial is good. It will improve GenFds performance if there >>> are more padding in FD region. >>> >>> Reviewed-by: Liming Gao >> >> Than

Re: [edk2] [PATCH 2/2] BaseTools/GenFds: speed up Region.PadBuffer()

2016-07-12 Thread Laszlo Ersek
ommitted as 0f65154396df..bd907fb63865. Thanks! Laszlo >>> -Original Message- >>> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of >>> Laszlo Ersek >>> Sent: Monday, July 11, 2016 11:55 PM >>> To: edk2-devel-01 >>> Cc: G

Re: [edk2] [PATCH 2/2] BaseTools/GenFds: speed up Region.PadBuffer()

2016-07-12 Thread Laszlo Ersek
ore I commit it.) Thanks Laszlo >> -Original Message- >> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of >> Laszlo Ersek >> Sent: Monday, July 11, 2016 11:55 PM >> To: edk2-devel-01 >> Cc: Gao, Liming >> Subject: [edk2

Re: [edk2] [PATCH 2/2] BaseTools/GenFds: speed up Region.PadBuffer()

2016-07-11 Thread Gao, Liming
day, July 11, 2016 11:55 PM > To: edk2-devel-01 > Cc: Gao, Liming > Subject: [edk2] [PATCH 2/2] BaseTools/GenFds: speed up Region.PadBuffer() > > The current implementation calls both pack() and Buffer.write() Size > times. The new implementation calls both of these methods only

Re: [edk2] [PATCH 2/2] BaseTools/GenFds: speed up Region.PadBuffer()

2016-07-11 Thread Laszlo Ersek
On 07/11/16 19:01, Andrew Fish wrote: > >> On Jul 11, 2016, at 8:55 AM, Laszlo Ersek wrote: >> >> The current implementation calls both pack() and Buffer.write() Size >> times. The new implementation calls both of these methods only once; the >> full data to write are constructed locally [1]. The

Re: [edk2] [PATCH 2/2] BaseTools/GenFds: speed up Region.PadBuffer()

2016-07-11 Thread Andrew Fish
> On Jul 11, 2016, at 8:55 AM, Laszlo Ersek wrote: > > The current implementation calls both pack() and Buffer.write() Size > times. The new implementation calls both of these methods only once; the > full data to write are constructed locally [1]. The range() function is > replaced by xrange()

[edk2] [PATCH 2/2] BaseTools/GenFds: speed up Region.PadBuffer()

2016-07-11 Thread Laszlo Ersek
The current implementation calls both pack() and Buffer.write() Size times. The new implementation calls both of these methods only once; the full data to write are constructed locally [1]. The range() function is replaced by xrange() because the latter is supposed to be faster / lighter weight [2]