Opened 12 years ago
Last modified 12 years ago
#4253 new enhancement
postgis memory allocation patches
Reported by: | tbonfort | Owned by: | pramsey |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | PostGIS Interface | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
attached is a small patch on mappostgis.c that cuts down the number of memory allocations that occur in msPostgisNextShape(), wkbConvPolygonToShape(), wkbConvLineStringToShape(), wkbConvPointToShape() and wkbReadLine()
In msPostgisNextShape() we use a static string for *wkb, and only resort to allocating *wkb if the returned line is larger than the static string.
in the wkbXXX() functions, we use a static lineObj instead of allocating it at each usage.
On my testcase where a postgis query is returning a high number of features, the processing time in in msPostgisLayerNextShape passed from 712ms to 518ms. The total allocated memory went from 205MB to 91MB
Attachments (1)
Change History (2)
by , 12 years ago
Attachment: | mappostgis.c.diff added |
---|
Look fine to me, feel free to apply.