Hi.

In the context of gvtools, we have a basic viewer with selection
capabilities. We have followed this approach[1] to manage selection
and as long as there is no selection (empty Set<FeatureId>), rendering
is ok. However, the bigger the Set<FeatureId> holding the selection
is, the slower the rendering goes.

I've identified the problem in FidFilterImpl class which checks if a
FeatureId is contained in the set of Identifiers by iterating through
all the elements in the set instead of using the Set.contains method,
which is much faster typically.

Is it a known issue or should I provide some code to reproduce the
behaviour easily?

The attached patch (just for testing) makes use of Set.contains and
works much faster. Quite probably there is a reason why Set.contains
is not used. For example, the patch instantiates a FeatureId, while
the FidFilterImpl works with Identifier interface.

I wonder if instead of a HashSet it could be possible to use a TreeSet
with a comparator that is independent of the concrete implementation
of Identifier.

Do you think this development would be possible/worth? Is there any
better approach to manage selection rendering?

Best regards.


[1] 
http://docs.geotools.org/latest/userguide/tutorial/map/style.html#creating-a-style-based-on-the-selection

Attachment: fid-filter.patch
Description: Binary data

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to