Why the use of package slow down performance ?
Afficher commentaires plus anciens
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.
Réponses (0)
Catégories
En savoir plus sur Environment and Settings dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!