<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><div id="yiv708495508"><table id="yiv708495508bodyDrftID" class="yiv708495508" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td id="yiv708495508drftMsgContent" style="font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; font-family: arial; font-size: 10pt;"><div id="yiv708495508"><table id="yiv708495508bodyDrftID" class="yiv708495508" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td id="yiv708495508drftMsgContent" style="font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; font-family: arial; font-size: 10pt;"><div id="yiv708495508"><table id="yiv708495508bodyDrftID" class="yiv708495508" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td id="yiv708495508drftMsgContent"
style="font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; font-family: arial; font-size: 10pt;"><div id="yiv708495508"><table id="yiv708495508bodyDrftID" class="yiv708495508" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td id="yiv708495508drftMsgContent" style="font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; font-family: arial; font-size: 10pt;">Hi,<br><br>I'm new to this list. A quick search did not find answers to two mapserver speed-optimization questions. Can someone please
help?<br><br>1. The following two lines of PHP from my application transform an php image object into a raster map layer:<br><br>imagepng($rmap, __MAPS_PATH__ . "resource.png");<br>$map->getLayerByName("resource")->set("data", __MAPS_PATH__ . "resource.png"); <br><br>The imagepng call is a major bottleneck when the extent of the layer is large.<br>Can the data in
image "$rmap" be accessed for layer "resource" directly, without the file write/read? If so, how? FYI, the following lines appear in my mapfile:<br><br> LAYER<br> NAME resource<br> DATA "resource.png"<br> TYPE raster<br> PROCESSING "RESAMPLE=NEAREST"<br> END<br><br>2. When
large vector layers are included in the map, or when the layer consists of labels, the mapObj's draw method is slow, even if only a small portion of the layer data is needed.<br><br>Sample SQL that created the layer data column is:<br><br>CREATE TABLE domains (<br> domid integer PRIMARY KEY,<br> ...<br>);<br>SELECT AddGeometryColumn('','domains','boundaries','4326','MULTIPOLYGON',2);<br>\i boundaries.sql; /* contains a bunch of INSERT INTOs */<br>CREATE INDEX dombound_idx ON domains USING gist (boundaries);<br>ALTER TABLE domains CLUSTER ON dombound_idx;<br><br>and the mapfile has:<br><br> LAYER<br> CONNECTIONTYPE postgis<br> PROCESSING "CLOSE_CONNECTION=DEFER"<br> NAME boundaries<br> DATA "boundaries from domains using unique
domid"<br>
TYPE POLYGON<br> CLASS<br> ... <br> END<br> END<br><br>Any suggestions for speeding this up?<br><br>Thanks a bunch,<br>Vince<br><br></td></tr></tbody></table></div></td></tr></tbody></table></div></td></tr></tbody></table></div></td></tr></tbody></table></div></td></tr></table><br>