Ticket #541 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

Drawing a single point takes inordinate amount of time

Reported by: crschmidt Owned by:
Priority: minor Milestone: 2.4 Release
Component: general Version:
Keywords: Cc:
State:

Description (last modified by crschmidt) (diff)

The following chunk of GML takes a huge amount of time to render. It seems that the drawCircle function in Renderer.SVG is taking this time:

drawCircle: function(node, geometry, radius) {

node.setAttributeNS(null, "cx", geometry.x); node.setAttributeNS(null, "cy", geometry.y); node.setAttributeNS(null, "r", radius);

},

commenting out the 'r' setAttribute causes the layer to load quickly, but to not show anything (since it has no radius).

I don't get it.

<?xml version='1.0' encoding="utf-8" ?>
<wfs:FeatureCollection
   xmlns:ms="http://mapserver.gis.umn.edu/mapserver"
   xmlns:wfs="http://www.opengis.net/wfs"
   xmlns:gml="http://www.opengis.net/gml"
    >
    <gml:featureMember>
      <ms:PointsOfInterest>
        <ms:msGeometry>
        <gml:Point srsName="EPSG:4326">
          <gml:coordinates>3.059317, 36.768121 </gml:coordinates>
        </gml:Point>
        </ms:msGeometry>
      </ms:PointsOfInterest>
    </gml:featureMember>
</wfs:FeatureCollection>

Attachments

SVG_reproject.patch Download (6.0 KB) - added by crschmidt 6 years ago.
SVG_reproject.2.patch Download (6.0 KB) - added by crschmidt 6 years ago.

Change History

Changed 6 years ago by crschmidt

  • description modified (diff)

Changed 6 years ago by tschaub

  • type changed from feature to bug

I assume this is the problem experienced here  http://www.nabble.com/Drawing-a-Point-Feature-in-Firefox-is-Slow-tf3468483.html

I think this is a bug at best - perhaps a blocker for 2.4.

Changed 6 years ago by sderle

  • status changed from new to closed
  • resolution set to worksforme

we can't seem to reproduce this bug? some one please reopen this with a concrete use case that triggers the bug, if at all poss.

Changed 6 years ago by sderle

  • status changed from closed to reopened
  • resolution worksforme deleted

Changed 6 years ago by crschmidt

So, I can reliably reproduce this bug in Firefox. However, Neither Webkit Nightlies nor Opera demonstrate this bug, which lead me to believing it's a bug in Firefox's SVG implementation.

Changed 6 years ago by crschmidt

Firefox's SVG renderer can't reliably draw points beyond a certain scale. (Because of the way our SVG support currently works, the coordinates are geoegraphic, and it appears the very small circle radius breaks Firefox).

The fix to this is essentially to turn the geo-space into pixel space, thus removing the need for very-tiny points. This is similar to the change made to the VML renderer.

I'm going to start working on this now.

Changed 6 years ago by crschmidt

Changed 6 years ago by crschmidt

  • keywords review added
  • Change coordinate space to be pixel based.
  • Redraw nodes totally on every 'reprojectNode' call
  • Make all x/y operations divided by resolution
  • add getComponentsString, getShortString helpers

Changed 6 years ago by crschmidt

Changed 6 years ago by crschmidt

typo in drawCurve/drawSurface fixed in this patch

Changed 6 years ago by sderle

  • keywords commit added; review removed

patch #2 looks good. please commit.

Changed 6 years ago by crschmidt

  • status changed from reopened to closed
  • resolution set to fixed

Changed 6 years ago by euzuro

  • keywords commit removed
Note: See TracTickets for help on using tickets.