Re: Avoid use deprecated Windows Memory API

2023-03-22 Thread Ranier Vilela
Em qua., 22 de mar. de 2023 às 07:01, Daniel Gustafsson escreveu: > > On 19 Mar 2023, at 23:41, Michael Paquier wrote: > > > > On Fri, Mar 17, 2023 at 12:19:56PM -0300, Ranier Vilela wrote: > >> Rebased to latest Head. > > > > I was looking at this thread, and echoing Daniel's and Alvaro's > > a

Re: Avoid use deprecated Windows Memory API

2023-03-22 Thread Daniel Gustafsson
> On 19 Mar 2023, at 23:41, Michael Paquier wrote: > > On Fri, Mar 17, 2023 at 12:19:56PM -0300, Ranier Vilela wrote: >> Rebased to latest Head. > > I was looking at this thread, and echoing Daniel's and Alvaro's > arguments, I don't quite see why this patch is something we need. I > would reco

Re: Avoid use deprecated Windows Memory API

2023-03-19 Thread Michael Paquier
On Fri, Mar 17, 2023 at 12:19:56PM -0300, Ranier Vilela wrote: > Rebased to latest Head. I was looking at this thread, and echoing Daniel's and Alvaro's arguments, I don't quite see why this patch is something we need. I would recommend to mark it as rejected and move on. -- Michael signature.a

Re: Avoid use deprecated Windows Memory API

2023-03-17 Thread Ranier Vilela
Em sex., 17 de mar. de 2023 às 10:58, Aleksander Alekseev < aleksan...@timescale.com> escreveu: > Hi, > > > Again, MSDN claims to use a new API. > > TWIMC the patch rotted a bit and now needs to be updated [1]. > I changed its status to "Waiting on Author" [2]. > Rebased to latest Head. best rega

Re: Avoid use deprecated Windows Memory API

2023-03-17 Thread Aleksander Alekseev
Hi, > Again, MSDN claims to use a new API. TWIMC the patch rotted a bit and now needs to be updated [1]. I changed its status to "Waiting on Author" [2]. [1]: http://cfbot.cputube.org/ [2]: https://commitfest.postgresql.org/42/3893/ -- Best regards, Aleksander Alekseev

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Ranier Vilela
Em qui., 15 de set. de 2022 às 10:30, Daniel Gustafsson escreveu: > > On 15 Sep 2022, at 15:13, Alvaro Herrera > wrote: > > > > On 2022-Sep-15, Ranier Vilela wrote: > > > >> Em qui., 15 de set. de 2022 às 09:50, Alvaro Herrera < > >> alvhe...@alvh.no-ip.org> escreveu: > > > >>> These functions y

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Daniel Gustafsson
> On 15 Sep 2022, at 15:13, Alvaro Herrera wrote: > > On 2022-Sep-15, Ranier Vilela wrote: > >> Em qui., 15 de set. de 2022 às 09:50, Alvaro Herrera < >> alvhe...@alvh.no-ip.org> escreveu: > >>> These functions you are patching are not in performance-sensitive code, >>> so I doubt this makes an

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Ranier Vilela
Em qui., 15 de set. de 2022 às 10:13, Alvaro Herrera < alvhe...@alvh.no-ip.org> escreveu: > On 2022-Sep-15, Ranier Vilela wrote: > > > Em qui., 15 de set. de 2022 às 09:50, Alvaro Herrera < > > alvhe...@alvh.no-ip.org> escreveu: > > > > These functions you are patching are not in performance-sensi

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Aleksander Alekseev
Hi Alvaro, > In what way is this code cleaner? I argue it is the opposite. Well, I guess it depends on the perspective. There are a bit more lines of code for sure. So if "less code is better" is the criteria, then no, the new code is not cleaner. If the criteria is to use an API according to th

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Alvaro Herrera
On 2022-Sep-15, Ranier Vilela wrote: > Em qui., 15 de set. de 2022 às 09:50, Alvaro Herrera < > alvhe...@alvh.no-ip.org> escreveu: > > These functions you are patching are not in performance-sensitive code, > > so I doubt this makes any difference performance wise. I doubt > > Microsoft will eve

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Alvaro Herrera
On 2022-Sep-15, Aleksander Alekseev wrote: > I agree with Alvaro that it is unlikely to be ever removed, but this > is a trivial change, so let's keep the code a bit cleaner. In what way is this code cleaner? I argue it is the opposite. -- Álvaro Herrera 48°01'N 7°57'E — https:

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Ranier Vilela
Em qui., 15 de set. de 2022 às 09:50, Alvaro Herrera < alvhe...@alvh.no-ip.org> escreveu: > On 2022-Sep-14, Ranier Vilela wrote: > > > According to: > > > https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-localalloc > > > LocalAlloc is deprecated. > > So use HeapAlloc instead,

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Ranier Vilela
Em qui., 15 de set. de 2022 às 09:58, Aleksander Alekseev < aleksan...@timescale.com> escreveu: > Hi Ranier, > > > use HeapAlloc instead, once LocalAlloc is an overhead wrapper to > HeapAlloc. > > Thanks for the patch. > > Although MSDN doesn't explicitly say that LocalAlloc is _depricated_ > +1 f

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Aleksander Alekseev
Hi Ranier, > use HeapAlloc instead, once LocalAlloc is an overhead wrapper to HeapAlloc. Thanks for the patch. Although MSDN doesn't explicitly say that LocalAlloc is _depricated_ +1 for replacing it. I agree with Alvaro that it is unlikely to be ever removed, but this is a trivial change, so le

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Alvaro Herrera
On 2022-Sep-14, Ranier Vilela wrote: > According to: > https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-localalloc > LocalAlloc is deprecated. > So use HeapAlloc instead, once LocalAlloc is an overhead wrapper to > HeapAlloc. These functions you are patching are not in perfo

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Ranier Vilela
Em qui., 15 de set. de 2022 às 05:35, Daniel Gustafsson escreveu: > > On 15 Sep 2022, at 01:19, Ranier Vilela wrote: > > > LocalAlloc is deprecated. > > So use HeapAlloc instead, once LocalAlloc is an overhead wrapper to > HeapAlloc. > > > > Attached a patch. > > Don't forget that patches which

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Daniel Gustafsson
> On 15 Sep 2022, at 01:19, Ranier Vilela wrote: > LocalAlloc is deprecated. > So use HeapAlloc instead, once LocalAlloc is an overhead wrapper to HeapAlloc. > > Attached a patch. Don't forget that patches which aim to reduce overhead are best when accompanied with benchmarks which show the eff