Q:

Speed up Dynamic for graphical interface

I am trying to create a user interface where I can click on certain points in a set of data and save them into a list that can be used later in my code. The problem is it is currently sluggish. Is there a way to speed this up?
Also how can I make it so I can unclick a point I have previously click I remove it from the list?
testdata = Array[{#, 1 + #^2*RandomReal[]} &, 100];
clicks = {testdata[[1]], testdata[[-1]]};

Dynamic[ListPlot[{Button[Tooltip@#, clicks = Join[clicks, {#}]] & /@ 
testdata, Sort[clicks, #1[[1]] < #2[[1]] &]}, {ImageSize -> 700, 
 PlotRange -> Automatic}]]

A:

Whole ListPlot is recalculated at each click because clicks value has changed, you can isolate Dynamic parts of graphics in Epilog to avoid that.
Using EventHandlers there will allow you to drop clicked points.
testdata = Array[{#, 1 + #^2*RandomReal[]} &, 100];
clicks = {testdata[[1]], testdata[[-1]]};

ListPlot[     
   Button[Tooltip @ #, AppendTo[clicks, #]] & /@ testdata,
   ImageSize -> 700, 
   PlotRange -> Automatic, 
   Epilog    -> {
     Dynamic[ 
       EventHandler[
         {AbsolutePointSize@12, Orange, Point@#}, 
         "MouseClicked" :> {clicks = DeleteCases[clicks, #]}
       ] & /@ clicks
     ]}
]

