Quantcast
Channel: DotSpatial Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1128

Closed Unassigned: Fix: Improved performance in DotSpatial.Symbology.FeatureScheme [63618]

$
0
0
Method private static List<Break> GetUniqueValues(string fieldName, DataTable table)
is very slow for large number of features. The problem is that it's complexity is O(N*N) as it linearly searches for repeated values for every feature. In my tests, a shapefile with about 280K features takes forever to complete.

My solution uses a Hashset instead of an ArrayList to store the unique values. As a result, searching for a repeating value is basically O(1) and the complexity of the whole method is reduced to O(N).

Attached is the fixed file. Original version is 1.8.
Comments: Thanks for this fix. It was added in [changeset 31ae152fd8a2](https://dotspatial.codeplex.com/SourceControl/changeset/31ae152fd8a2591678ae93d8e342ab7bb10af6bc).

Viewing all articles
Browse latest Browse all 1128

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>