Why the use of package slow down performance ?
Show older comments
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.
Answers (0)
Categories
Find more on Environment and Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!