Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#3130 closed defect (wontfix)

ANGLE FOLLOW performance issue in Linux (not in MS4W)

Reported by: clj2289 Owned by: sdlime
Priority: normal Milestone: 5.6 release
Component: MapServer C Library Version: 5.4
Severity: normal Keywords:
Cc: dmorissette, aboudreault, jmckenna

Description (last modified by dmorissette)

Using ANGLE FOLLOW on an annotation layer increases draw time for a layer by a factor of 3, but only on Linux. This was tested using shp2img command on the following version, 5.4.2, 5.4.1, 5.2.3, 5.0.0 and trunk (9/21/2009). The difference in performance can be see in the following log message comparing ANGLE FOLLOW and ANGLE AUTO. Attached you will find a test set and a profile of ANGLE FOLLOW and ANGLE AUTO.

Angle Follow:

[Mon Sep 21 02:01:50 2009].285986 msDrawMap(): Layer 0 (local road names), 0.129s
[Mon Sep 21 02:01:55 2009].313465 msDrawMap(): Drawing Label Cache, 5.027s
[Mon Sep 21 02:01:55 2009].313504 msDrawMap() total time: 5.158s
[Mon Sep 21 02:01:55 2009].334529 msSaveImage() total time: 0.021s
[Mon Sep 21 02:01:55 2009].334601 msFreeMap(): freeing map at 0x8114e08.

Angle Auto:

[Mon Sep 21 02:02:30 2009].164785 msDrawMap(): Layer 0 (local road names), 0.016s
[Mon Sep 21 02:02:31 2009].757127 msDrawMap(): Drawing Label Cache, 1.592s
[Mon Sep 21 02:02:31 2009].757163 msDrawMap() total time: 1.610s
[Mon Sep 21 02:02:31 2009].780415 msSaveImage() total time: 0.023s
[Mon Sep 21 02:02:31 2009].780487 msFreeMap(): freeing map at 0x86b1e08.

Attachments (7)

angle_auto.txt (92.7 KB ) - added by clj2289 15 years ago.
angle_follow.txt (97.8 KB ) - added by clj2289 15 years ago.
5.2.1-angle-auto.png (36.5 KB ) - added by jmckenna 15 years ago.
windows 5.2.1 angle auto image
5.2.1-angle-follow.png (56.8 KB ) - added by jmckenna 15 years ago.
windows 5.2.1 angle follow image
5.4.2-angle-auto.png (44.4 KB ) - added by jmckenna 15 years ago.
windows 5.4.2 angle auto image
5.4.2-angle-follow.png (58.1 KB ) - added by jmckenna 15 years ago.
windows 5.4.2 angle follow image
test-agg.map (878 bytes ) - added by aboudreault 15 years ago.
AGG Map

Download all attachments as: .zip

Change History (16)

by clj2289, 15 years ago

Attachment: angle_auto.txt added

by clj2289, 15 years ago

Attachment: angle_follow.txt added

comment:1 by clj2289, 15 years ago

Could not upload test set to trac b/c of file size limitations. Please download from http://c0342891.cdn.cloudfiles.rackspacecloud.com/test.tar.gz

comment:2 by dmorissette, 15 years ago

Cc: dmorissette aboudreault added
Description: modified (diff)
Milestone: 5.6 release

comment:3 by jmckenna, 15 years ago

Cc: jmckenna added

My testing results (which do seem extreme):

1) Windows MapServer 5.4.2 (MS4W 3.0 beta)

  • with ANGLE FOLLOW

msDrawMap() total time: 3.939s

  • normal

msDrawMap() total time: 1.836s

2) Gentoo Unix MapServer 5.5.0 (dev)

  • with ANGLE FOLLOW

msDrawMap() total time: 10.788s

  • normal

msDrawMap() total time: 2.662s

comment:4 by aboudreault, 15 years ago

So, We can say that the problem is not only on Linux. However, I'm running Ubuntu here with MapServer 5.5.0 (dev), and the time difference is the same than MapServer 5.4.2. I don't really why you get a 10.7 seconds on you gentoo machine. I'll investigate in the performance problem.

comment:5 by jmckenna, 15 years ago

More Windows testing:

  1. MapServer 5.2.1 (MS4W 2.3.1)

  • ANGLE FOLLOW
    • msDrawMap() total time: 1.646s
  • ANGLE AUTO
    • msDrawMap() total time: 2.154s
  1. MapServer 5.4.2 (MS4W 3.0 beta)
  • ANGLE FOLLOW
    • msDrawMap() total time: 3.949s
  • ANGLE AUTO
    • msDrawMap() total time: 1.829s

(images look similar..attached)

by jmckenna, 15 years ago

Attachment: 5.2.1-angle-auto.png added

windows 5.2.1 angle auto image

by jmckenna, 15 years ago

Attachment: 5.2.1-angle-follow.png added

windows 5.2.1 angle follow image

by jmckenna, 15 years ago

Attachment: 5.4.2-angle-auto.png added

windows 5.4.2 angle auto image

by jmckenna, 15 years ago

Attachment: 5.4.2-angle-follow.png added

windows 5.4.2 angle follow image

comment:6 by aboudreault, 15 years ago

On Linux with MapServer 5.6-dev, here's the difference between GD and AGG (angle follow):

  • GD: real 0m4.165s
  • AGG: real 0m0.524s


I'll join the mapfile I used for agg tests.

by aboudreault, 15 years ago

Attachment: test-agg.map added

AGG Map

comment:7 by aboudreault, 15 years ago

Resolution: wontfix
Status: newclosed

After further investigation, I can conclude that the problem is related to GD with label outline color. Just by removing the OUTLINECOLOR 255 255 255 keyword of the label class in the mapfile, we can see a big performance improvement.

Thanks jmckenna and clj2289!

I close this ticket because there is already one for that bug. See that ticket for more info: http://trac.osgeo.org/mapserver/ticket/1243

in reply to:  6 comment:8 by sdlime, 15 years ago

Replying to aboudreault:

On Linux with MapServer 5.6-dev, here's the difference between GD and AGG (angle follow):

  • GD: real 0m4.165s
  • AGG: real 0m0.524s


I'll join the mapfile I used for agg tests.

This difference may be due to the outlinecolor in a label. GD has to use a brute force approach (offseting and redrawing text) while AGG strokes the background once. If you remove that option do the timings become closer?

Steve

comment:9 by aboudreault, 15 years ago

I suppose that you didn't see my last comment. Yes the timing become closer as soon as I remove the outlinecolor.

Note: See TracTickets for help on using tickets.