UI performance with large image data

A lot can be tweaked, but it is hardly ever straightforward:

img = Import["http://biology.usf.edu/cmmb/images/cells2.jpg"]

roiSelector[img_] := DynamicModule[
  {v,
   pt1, pt2,  dim,
   imgDim = ImageDimensions@img,
   w = 300, wI,  h = Automatic, ratio
  }
  ,      
  ratio = #/#2 & @@ imgDim;
  dim = Round[w imgDim/imgDim[[1]]];
  pt1 = .3 dim; pt2 = .7 dim;
  wI = w;

  EventHandler[
    Framed @ Pane[          
        Dynamic[
          Show[
            HighlightImage[
               ImageResize[img, {wI, Automatic}], 
               { Dynamic @ Rectangle[pt1, pt2], 
                 Locator @ Dynamic[ pt1, 
                    {(v = pt2 - pt1) &, (pt1 = #; pt2 = pt1 + v) &, None}
                 ], 
                 Locator @ Dynamic @ pt2
               }
            ], 
            ImageSize -> {w, Automatic}
          ],
          TrackedSymbols      :> {wI}, 
          SynchronousUpdating -> False, 
          ImageSizeCache      -> dim
        ]          
     ,
     ImageSize -> Dynamic[{w, h}, ({w, h} = {1, 1/ratio} #[[1]]) &],
     AppearanceElements -> All
     ]
   ,
   {"MouseUp" :> ({pt1, pt2} = {pt1, pt2} w/wI; wI = w;)}, 
   PassEventsDown -> True
   ]
  ]

Grid[{{#, #}, {#, #}}] & @ roiSelector @ img

enter image description here


enter image description here


enter image description here


Another approach is to set the red box to be a locator. Then you can display the image and use the red-box-locator to define the region of interest. This speeds it up a little. The major problem seems to be that the image resizing is done inside the dynamic environment. This can be helped by resizing the image once (and then using that smaller version for display). The box moves around almost instantaneously.

img = Import["http://biology.usf.edu/cmmb/images/cells2.jpg"];
box = Graphics[{Opacity[0], Rectangle[{0, 0}, {1, 1}], Red, 
                Opacity[0.5], Rectangle[{0.3, 0.4}, {0.6, 0.6}]}];
imgSmall = ImageResize[img, 512];
Manipulate[imgSmall, {pt, Locator, Appearance -> box}]