Python package created using Matlab Compiler taking long time to start execution
2 ビュー (過去 30 日間)
古いコメントを表示
We have created a python package out of matlab code using Matlab Compiler, which exposes one function which is called from within a web app written in python. We found on close inspection that there is a significant time (~4 seconds) delay between the webapp making the call the to the python function in the python package created by the compiler and the first statement in the matlab code getting executed. The main matlab function itself executes fairly fast once it starts execution, but the initial delay is presenting a bottleneck. Is it some sort of runtime initialization ? But if at all that is the case , shouldn't it be just one once during the first call ? The delay happens for us on each call.
Why would this happen ? Could we be missing anything in terms of configuration or something ?
Environment : The python package is created using Matlab Compiler installed on a Linux box, and is also deployed on a Linux box. We dont use parallel pools yet.
0 件のコメント
回答 (1 件)
Chetan Rawal
2016 年 9 月 14 日
The delay is due to MATLAB Runtime startup time. If you can keep the MATLAB Runtime running on the server between calls, you won't see the delay. Tips: http://undocumentedmatlab.com/blog/speeding-up-compiled-apps-startup
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で MATLAB Compiler SDK についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!