Reduce MATLAB method startup time

조회 수: 2 (최근 30일)
mclaus000
mclaus000 2020년 3월 10일
댓글: mclaus000 2020년 3월 16일
I am running a number of MATLAB compiled methods from within a >NET winforms application.
The verty first time I call any of the compiled methods, the startup time is very long (1-2 minutes). I expect this is because the matlab run-time is bing initialized. Is there an approproate way to initialize theMATLAB run-time beofre I attempt to call a particualr method? If there was some mehod I could call during the form startup, then my user would not need to experience this delay.

답변 (1개)

BobH
BobH 2020년 3월 10일
I couldn't find a way to avoid the delay, but I use this to give the user a reason for the delay. It uses my specific situation where on a fresh start of MATLAB, inmem reports 22 items, but after the long delay completes, inmem reports 237 items.
if( length(inmem) < 100 )
disp(' ... allow 30 seconds to preload more of MATLAB. This is a one-time delay.');
end
  댓글 수: 1
mclaus000
mclaus000 2020년 3월 16일
Thanks for your response. I find this to be a prety annoying aspect of trying to bundle MATLAB with another app. I did something similar, which I pop up a window if it is the first time I've called a matlab method

댓글을 달려면 로그인하십시오.

카테고리

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

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by