View Issue Details

IDProjectCategoryView StatusLast Update
0006641Source patchesServerpublic2011-11-09 08:47
ReporterWAssigned Toccw 
Status resolvedResolutionfixed 
Product Version 
Target Version1.2Fixed in Version1.2 
Summary0006641: patch: CZoneNames speedup - from O(n) to O(n^c), 0<c<1

Currently, CZoneNames::GetZone(vecPosition) iterates over every defined zone and selects smallest one that is bounding the point given as argument. Lookup takes O(n) time.

It can be brought down to O(n^c), 0<c<1 by simply sorting zones by their volume, and updating algorithm to return first zone matching.

Attached patch contains updated GetZone() method and new (sorted) zone definitions. Number format differs slightly, but are values all exact the same, included those given in scientific notation.

Additional Information

Patch applies both to client and server copies of CZoneNames.

TagsNo tags attached.



2011-11-08 23:11

updater   ~~0015197

Issue automatically marked as fixed by mantisbot ( Fixed in )

Issue History

Date Modified Username Field Change