Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#3189 closed enhancement (fixed)

Reduce code duplication in mapsearch.c

Reported by: bretlambert Owned by: sdlime
Priority: normal Milestone: 5.6 release
Component: MapServer C Library Version: svn-trunk (development)
Severity: normal Keywords:
Cc: dmorissette

Description

The code for msIntersectPolylines() is shotgunned throughout mapsearch.c; this diff consolidates that code into calles to msIntersectPolylines(). I've measured improvements in map generation times after applying this patch (which is against 5.6.0-beta4), likely due to better CPU cache usage after shrinking the resulting binary by ~766kB (RAM access is expensive!).

Attachments (1)

mapsearch.c.msIntersectPolylines.diff (3.4 KB ) - added by bretlambert 15 years ago.

Download all attachments as: .zip

Change History (5)

by bretlambert, 15 years ago

comment:1 by sdlime, 15 years ago

Cc: dmorissette added
Milestone: 5.6 release
Status: newassigned

We love performance improvements. What sort of numbers did you see? CC'ing Dan to make sure it's ok to apply at this point...

Steve

comment:2 by bretlambert, 15 years ago

Only tested it on a half-dozen files, but consistently 7-8% less time to generate the file, as reported by mapserver's output on the command line (and I'm pretty sure that it had to do with the workload under consideration, so YMMV, of course).

comment:3 by sdlime, 15 years ago

Resolution: fixed
Status: assignedclosed

I didn't see much of a difference in binary size, only about 4K but cleaner code is always a good thing... Applied in r9514.

Steve

comment:4 by dmorissette, 14 years ago

Cool. :)

Note: See TracTickets for help on using tickets.