Optimizing Node Files Support - Mailing list pgsql-hackers

From Ranier Vilela
Subject Optimizing Node Files Support
Date
Msg-id CAEudQAoJPmuJcymSN4ogXFY8AHGcLgSGj4xeXWKD1WrzZ9Azvw@mail.gmail.com
Whole thread Raw
Responses Re: Optimizing Node Files Support  (John Naylor <john.naylor@enterprisedb.com>)
List pgsql-hackers
Hi,

I believe that has room for improving generation node files.

The patch attached reduced the size of generated files by 27 kbytes.
From 891 kbytes to 864 kbytes.

About the patch:
1. Avoid useless attribution when from->field is NULL, once that
the new node is palloc0.

2. Avoid useless declaration variable Size, when it is unnecessary.

3. Optimize comparison functions like memcmp and strcmp, using
 a short-cut comparison of the first element.

4. Switch several copy attributions like COPY_SCALAR_FIELD or COPY_LOCATION_FIELD
by one memcpy call.

5. Avoid useless attribution, ignoring the result of pg_strtok when it is unnecessary.

regards,
Ranier Vilela


Attachment

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: generic plans and "initial" pruning
Next
From: li jie
Date:
Subject: Re: Support logical replication of DDLs