A few things to note, don't use UDT parameters, many threads on this, here is one:
Also, I gave up on overlays. Even on the fastest window, I would always get flickering of the overlays. I turned them off during project load, I think it was system.tag.setOverlaysEnabled(0)