WHY ITS TAKING TIME TO LAUNCH MATLAB EXE FILE IN VISUAL STUDIO C++?
    조회 수: 5 (최근 30일)
  
       이전 댓글 표시
    
 I HAVE CREATED MATLAB EXE FILE TO CONTROL ON VVISUAL STUDIO BUT THE CODE WHICH IS TAKING 8 SEC IS TAKING 20 SEC WHEN WE CALL THROUGH EXE FILE . BUT WHEN WE KEEP THE TIMER IN MATLAB EXE CODE ITS SHOWING 9-10 SEC THAT MEANS ITS TAKING NEARLY 10 SEC TO LAUNCH . IAM GIVING INPUT FROM VISUAL STUDIO TO MATLLAB EXE FILE AND EXTRACTING OUTPUT FROM MATLAB EXE FILE TO VISUAL STUDIO. IS THERE ANY WAY TO SOLVE THIS ISSUSE ?  IS THERE ANY WAY TO REDUCE THE LAUNCH TIME BY MATLAB EXE FILE
댓글 수: 0
답변 (2개)
  Karan Singh
      
 2025년 2월 26일
        When you launch your MATLAB executable, which relies on the MATLAB Compiler Runtime (MCR), from Visual Studio, a significant portion of the delay comes from initializing the runtime environment. This overhead is inherent to how MATLAB-compiled applications start up, so if you call the EXE repeatedly, you incur this startup cost every time.
The suggestions can be quite generic but, instead of launching a new MATLAB EXE for every call, try designing your application so that the MCR is started only once. Additionally, if your code does not require Java features, you might consider launching it with options such as "-nojvm" to reduce startup time.
Karan
댓글 수: 0
  Walter Roberson
      
      
 2025년 2월 26일
        The official solution is to use MATLAB Production Server https://www.mathworks.com/products/matlab-production-server.html
Production Server keeps some MATLAB instances "warm", ready to be invoked on short notice.
댓글 수: 0
참고 항목
카테고리
				Help Center 및 File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


