I have an AIR Native Extension with a C implementation for Windows to provide access to the Kinect for Windows SDK. I am aware of AIRKinect, but certain factors require a custom solution.
Recently, a problem has been occuring, resulting in the whole application to slow down by the factor of ~100, when started from within Flash Builder 4.6 using the Run/Debug buttons.
Attempted Solutions
Initially, a reboot would allow me to run/debug the application once before the problem occurs again. Soon after, even this method started failing to work.
The problem seemed permanently solved when restoring the system to a state from one month ago. The only changes to the system that happened in this time frame are Windows updates. Installing new Windows updates today apparently brought the issue back to life.
It is confirmed that the cause of the problem does not lie in my source code - I rolled back to several past revisions, but the problem persisted.
Strangely enough, no problems occur when exporting the application as a release build, installing it, and running it like that. This workflow, however, is not suitable for day-to-day development, as the build takes a full minute, and proper debugging is not possible (at least I know of no way to attach the debugger to a running, installed AIR application.)
Location
By profiling the code, I managed to track down the unusually long run times to the calls to context.call
. Curiously, the functions implementing the native part are fast as usual, when measuring the time passed between start and end of the function block.
This can only mean that the problem lies somewhere in between. Due to the lack of information on the Internet on cases like this, and I have exhausted the knowledge of myself and my colleagues. I greatly appreciate any advice that might help finding cause and solution of this problem.