slow which() to locate functions after Ubuntu OS upgrade
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
After upgrading from (X)Ubuntu 18.04 to Xubuntu 20.04, the which() function has become way slower.
tic
for rep = 1 : 100
which('myfcn'); % could exist, or not
end
toc
This takes about 1.2 seconds. Not huge, since I only realistically call which() a few times, but I noticed this when benchmarking a function against problem-size. Before the upgrade, a problem of size n took time O(n) so long as n >= 1000, roughly. After the upgrade, the time was O(1), i.e. constant and insensitive to n, and only O(n) after n >= 16000, roughly. That is, which() became the bottleneck for small problems.
I'm on a Thinkpad P1. The MATLAB path is not abnormally large; actually, I removed some things during the upgrade, so it's smaller than before. I've also tried to restoredefaultpath() which shaves 0.3 sec off the above 1.2 sec figure. Using rehash didn't change the results. I upgraded to R2020a simultaneously, but I subsequently re-installed R2019a (which I was using before) and it's the same speed.
Any ideas on how to investigate this further? Thanks.
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Software Development Tools finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!