From: | Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> |
---|---|
To: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Optimizing Node Files Support |
Date: | 2022-12-01 13:02:11 |
Message-ID: | CAEudQAoJPmuJcymSN4ogXFY8AHGcLgSGj4xeXWKD1WrzZ9Azvw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
optimize_gen_nodes_support.patch | application/octet-stream | 12.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | li jie | 2022-12-01 13:03:02 | Re: Support logical replication of DDLs |
Previous Message | Amit Langote | 2022-12-01 12:43:28 | Re: generic plans and "initial" pruning |