[Koha-bugs] [Bug 25078] Gracefully stop updatedatabase/installer when a database change cannot be applied

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Feb 22 16:04:29 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25078

--- Comment #29 from Julian Maurice <julian.maurice at biblibre.com> ---
About the performance of directory listing, I ran a small test:

% mktemp -d
/tmp/tmp.t2Pdul9xNn

% grep 'DBversion =' installer/data/mysql/updatedatabase.pl | wc -l
1240  # That is the number of DB updates since 3.0

% for i in $(seq 1 1240); do touch /tmp/tmp.t2Pdul9xNn/$(openssl rand -hex 32);
done

% perl -MTime::HiRes=tv_interval,gettimeofday -E 'my $t0 = [gettimeofday];
opendir(my $dh, $ARVG[0]); my @names; foreach my $fname (sort readdir($dh)) {
push @names, $fname; } closedir($dh); my $elapsed = tv_interval($t0); say
1000*1000*$elapsed . "µs";' /tmp/tmp.t2Pdul9xNn/
25µs

I ran it several times and the result is always between 10µs and 50µs, so... I
think there are better things to worry about.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list