Cursor location found much faster in mfile than in compiled exe. How to fix?

1 view (last 30 days)
I have a mfile which finds the location of the user's cursor in an axis, and each identified location is the basis for calculations. The results are displayed quickly, seemingly concurrent with the cursor motion. When I run an exe executable compiled from the same mfile, however, results are displayed slowly, as if the exe is struggling to keep up with the cursor's motion unless I move it very slowly. I am running R2015b and compiling with the Application Compiler tool, and the mfile is part of a GUI. Are there any known issues that might be slowing the exe?

Accepted Answer

Harsh
Harsh on 20 Jul 2017
Edited: Harsh on 20 Jul 2017
Based on your description of the issue, it appears that you are deploying a GUI that utilizes the .m file which finds the user's cursor in an axis. There are a few known bugs that were fixed for the latest R2017a release of MATLAB. You can learn more about these bugs such as (1314781,1504736 etc.) here. Consequently, if you have an active Software Maintenance Service, you can try building your application from R2017a instead.
However, please note that the first time you start a MATLAB compiled executable it has to initialize the MATLAB Runtime Environment as well as extract and create the mcr directory. This a one time operation. It should then however run as in base MATLAB.
While there could be other causes for this behavior, you can debug this using the following options assuming you are on a Windows machine:
Using deploytool -> application compiler -> Additional runtime settings
  • Un-check the "Do not display the Windows Command Shell..." option
  • Check the "Create log file" box
Later, inspect both the Windows console and the log file for further details on the cause of this behavior.
If the issue persists, please contact MathWorks Technical Support here: https://www.mathworks.com/support/contact_us/
Please be sure to provide a detailed description of the issue and attach any relevant files / code / examples required to investigate the issue.

More Answers (0)

Categories

Find more on Get Started with MATLAB Compiler in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!