I'm building a standalone guide application which uses impoly
inside.
When I drag the vertices of polygon created using impoly
or drag the polygon itself, there's noticeable delay for actions, this doesn't happen in the MATLAB script file.
Even a simple script like the code below will create the delay after being converted to executable.
figure, imshow('peppers.png')
h = impoly(gca, []);
What is causing the delay here, and how can I solve this?
I know that using self defined drawing functions and windowbutton
functions is faster but I don't want to lose the ease of using an impoly
object because it's handled by internal codes.
The compiler version is R2011a.
Updates:
Not only impoly
becomes slow when deployed. All rendering of graphic objects become slow. Pan tool and zoom tools have delays as well.
The solution is using uiwait
to block the execution before exit. But I don't know why that solves the problem.