Optimize user selection draw code

Summary

Drawing a thousand's object user selection is slowing down the viewport frame rate a lot.

Improvements

Find the element causing the drawing slowdown and fix it

  • Trigger only one draw for all boxes
  • Cache bbox indices and coords
Edited by Swann Martinez