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

조회 수: 1 (최근 30일)
KAE
KAE 2017년 7월 17일
댓글: KAE 2017년 7월 24일
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?

채택된 답변

Harsh
Harsh 2017년 7월 20일
편집: Harsh 2017년 7월 20일
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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by