# Removing Many InternalFeatures

**URL:** <https://community.thinkgeo.com/t/removing-many-internalfeatures/2311>\
**Category:** WinForms\
**Created:** [October 31, 2013, 9:34am UTC](https://community.thinkgeo.com/t/removing-many-internalfeatures/2311 "2013-10-31T09:34:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/e79b87/32.png) [@Steve2](https://community.thinkgeo.com/u/Steve2)\
**Post date:** [October 31, 2013, 9:34am UTC](https://community.thinkgeo.com/t/removing-many-internalfeatures/2311/1 "2013-10-31T09:34:50Z")

</div>

My&nbsp;Pointslayer&nbsp;can&nbsp;have&nbsp;Many&nbsp;Icons&nbsp;displayed&nbsp;at&nbsp;a&nbsp;given&nbsp;time.  
  
  
  
The&nbsp;user&nbsp;has&nbsp;the&nbsp;option&nbsp;of&nbsp;selecting&nbsp;a&nbsp;date&nbsp;range&nbsp;of&nbsp;icons&nbsp;to&nbsp;display.  
  
  
  
&nbsp;On&nbsp;a&nbsp;regular&nbsp;Interval&nbsp;the&nbsp;system&nbsp;will&nbsp;query&nbsp;the&nbsp;database&nbsp;and&nbsp;based&nbsp;on&nbsp;whether&nbsp;the&nbsp;icon&nbsp;exists&nbsp;or&nbsp;not&nbsp;will&nbsp;either&nbsp;display&nbsp;or&nbsp;remove&nbsp;the&nbsp;Icon&nbsp;from&nbsp;the&nbsp;layer.  
  
  
  
  
  
&nbsp;As&nbsp;a&nbsp;test&nbsp;,&nbsp;I&nbsp;have&nbsp;50,000&nbsp;icons.&nbsp;&nbsp;&nbsp;(&nbsp;A&nbsp;Bit&nbsp;much&nbsp;but&nbsp;makes&nbsp;the&nbsp;timing&nbsp;variance&nbsp;easier&nbsp;to&nbsp;monitor)  
  
  
  
Adding&nbsp;Icons&nbsp;(&nbsp;&nbsp;All&nbsp;50,000&nbsp;)&nbsp;takes&nbsp;approx&nbsp;&nbsp;&nbsp;90&nbsp;seconds.&nbsp;&nbsp;(&nbsp;I&nbsp;am&nbsp;Very&nbsp;happy&nbsp;with&nbsp;this.)  
  
  
  
If&nbsp;the&nbsp;user&nbsp;narrows&nbsp;the&nbsp;Time&nbsp;frame,&nbsp;&nbsp;The&nbsp;removal&nbsp;of&nbsp;the&nbsp;Icons&nbsp;outside&nbsp;the&nbsp;date&nbsp;range&nbsp;Is&nbsp;vastly&nbsp;slower.&nbsp;(&nbsp;10-20&nbsp;Minutes)&nbsp;&nbsp;to&nbsp;remove&nbsp;3,000&nbsp;icons.  
  
the&nbsp;removal&nbsp;&nbsp;is&nbsp;a&nbsp;simple&nbsp;&nbsp;&nbsp;&nbsp;**pointLayer.InternalFeatures.Remove(LayerKey)**  
  
  
  
any&nbsp;Ideas&nbsp;on&nbsp;how&nbsp;to&nbsp;remove&nbsp;these&nbsp;faster.&nbsp;&nbsp;&nbsp;(&nbsp;&nbsp;&nbsp;Can&nbsp;I&nbsp;perform&nbsp;a&nbsp;select&nbsp;on&nbsp;the&nbsp;layer&nbsp;and&nbsp;remove&nbsp;as&nbsp;a&nbsp;batch?)  
  
  
  
PS.&nbsp;&nbsp;&nbsp;Clearing&nbsp;all&nbsp;and&nbsp;redrawing&nbsp;caused&nbsp;a&nbsp;very&nbsp;erratic&nbsp;user&nbsp;interface&nbsp;and&nbsp;&nbsp;&nbsp;I&nbsp;do&nbsp;not&nbsp;want&nbsp;to&nbsp;go&nbsp;down&nbsp;that&nbsp;road.

---

<div class="post-metadata">

**Author:** ![Johnny](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/johnny/32/19044_2.png) [@Johnny](https://community.thinkgeo.com/u/Johnny)\
**Post date:** [November 1, 2013, 3:44am UTC](https://community.thinkgeo.com/t/removing-many-internalfeatures/2311/2 "2013-11-01T03:44:35Z")

</div>

Hi&nbsp;Steve,&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Sorry&nbsp;to&nbsp;say,&nbsp;I&nbsp;am&nbsp;afraid&nbsp;it&nbsp;is&nbsp;hard&nbsp;to&nbsp;enhance&nbsp;it.&nbsp;It&nbsp;is&nbsp;because&nbsp;the&nbsp;InternalFeatures&nbsp;is&nbsp;a&nbsp;GeoCollection&nbsp;type&nbsp;and&nbsp;the&nbsp;GeoCollection&nbsp;is&nbsp;an&nbsp;extension&nbsp;of&nbsp;Collection.&nbsp;In&nbsp;the&nbsp;GeoCollection,&nbsp;we&nbsp;will&nbsp;manager&nbsp;all&nbsp;the&nbsp;features&nbsp;index&nbsp;and&nbsp;this&nbsp;make&nbsp;the&nbsp;"Remove"&nbsp;is&nbsp;not&nbsp;simple.&nbsp;So&nbsp;we&nbsp;can&nbsp;see&nbsp;the&nbsp;behavior&nbsp;that&nbsp;the&nbsp;more&nbsp;features&nbsp;in&nbsp;the&nbsp;GeoCollection,&nbsp;the&nbsp;more&nbsp;slower&nbsp;it&nbsp;will&nbsp;takes.&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Sorry&nbsp;for&nbsp;any&nbsp;inconvenience.&nbsp;  
&nbsp;Johnny&nbsp;
