uigetfile takes ages when using appdesigner
2 ビュー (過去 30 日間)
古いコメントを表示
Hi, not sure why, but its taking about 20s:
path='D:\temp';
try
[file,path]=uigetfile({'*.mat','Mat Files'},'Load Data',...
path);
catch
[file,path]=uigetfile({'*.mat','Mat Files'},'Load Data',...
'C:\');
end
openpath=fullfile(path,file);
%whos('-file',openpath)
load (openpath,'wv','sp','htext','colors');
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/271372/image.png)
0 件のコメント
回答 (1 件)
Raunak Gupta
2020 年 2 月 18 日
Hi,
From the profile viewer I can see that the self-time (actual time taken by the function without considering children function) is very less for uigetfile. Most of the time is taken by the FileOpenChooser.doShowDialog which essentially open the dialog box from which you may choose the file. Time taken by FileOpenChooser.doShowDialog essentially shows the time taken by the user to select the file. So, as I recreated the above situation, I found that the uigetfile is not running slow.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!