Opened 11 years ago
Closed 11 years ago
#2494 closed patch (fixed)
Avoid unnecessary memory copy in gserialized_datum_get_box2df_p
Reported by: | hayamiz | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.0.5 |
Component: | postgis | Version: | 2.0.x |
Keywords: | Cc: |
Description
In gserialized_datum_get_box2df_p, PG_DETOAST_DATUM_SLICE is always called for obtaining header section of the gserialized datum. PG_DETOAST_DATUM_SLICE always performs memory allocation and copy, but such memory operations are not necessary when the datum is not extended( not external nor compressed ).
This patch removes such extra memory operations. In case of non-external and non-compressed geometry data, PG_DETOAST_DATUM is used instead of _SLICE. For external or compressed (typically large) geometry data, PG_DETOAST_DATUM_SLICE is still used not to copy whole objects.
Attachments (1)
Change History (4)
by , 11 years ago
Attachment: | 0001-avoid-detoast-slicing-if-datum-is-not-extended.patch added |
---|
comment:1 by , 11 years ago
Milestone: | → PostGIS 2.0.5 |
---|
I've applied this to trunk @ r12042 (thanks!) to see if any negative consequences fall out. If not, I'll apply back to 2.1 and 2.0