Why the use of package slow down performance ?
Ältere Kommentare anzeigen
Hello everyone,
I use R2009b and I notice a performance problem when doing a "cd" of a directory containing packages...
Any explanation ?
Pierre
Code:
nbPackages = 10;
rootDir = pwd;
mainDir = fullfile(rootDir, 'test_pkg');
pkgName = mainDir;
for i=1:nbPackages
pkgName = fullfile(pkgName, sprintf('+pkg_%d', i));
mkdir(pkgName);
end
dirName = mainDir;
for i=1:nbPackages
dirName = fullfile(dirName, sprintf('dir_%d', i));
mkdir(dirName);
end
tic, cd(fullfile(mainDir, '+pkg_1')), toc %Elapsed time is 1.073048 seconds.
tic, cd(fullfile(mainDir, 'dir_1')), toc %Elapsed time is 0.126087 seconds.
Antworten (0)
Kategorien
Mehr zu Environment and Settings finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!