[Koha-devel] koha-upgrade-schema extremely slow even when no upgrades to make

dcook at prosentient.com.au dcook at prosentient.com.au
Thu Oct 1 08:20:40 CEST 2020


I'd have to do a time test.

However, when you say 1.5s, do you mean per instance? If so, that is probably about right. I have about 54 instances I'm upgrading, and it feels like it's taking around 2+ minutes. 

I suppose there are also nearly 20,000 lines of conditionals in updatedatabase.pl as well. 

I reckon updatedatabase.pl should run C4::Context->preference("Version") and compare it against $Koha::VERSION at the start of the script. If the former is less than the latter, then launch into the 20,000 lines of conditionals (or better yet a more optimized install path but that would be out of scope here).

Although as you say... the majority of the time is probably to load the DBIC schema and the modules. 

It just seems a shame it takes that long just for it to conclude that there's no work to do. 

Maybe koha-upgrade-schema could be optimized to use some utility scripts that rapidly report the code version and the database version to know if it even needs to run updatedatabase.pl...

At the moment, I just find it unsettling how long it takes to deploy Koha to production when using the Debian packages for a server with many tenants.

David Cook
Software Engineer
Prosentient Systems
72/330 Wattle St
Ultimo, NSW 2007
Australia

Office: 02 9212 0899
Online: 02 8005 0595

-----Original Message-----
From: Jonathan Druart <jonathan.druart at bugs.koha-community.org> 
Sent: Monday, 28 September 2020 9:18 PM
To: David Cook <dcook at prosentient.com.au>
Cc: Koha Devel <koha-devel at lists.koha-community.org>
Subject: Re: [Koha-devel] koha-upgrade-schema extremely slow even when no upgrades to make

What is "extremely slow"? It takes 1.5s to run for me, time to load the modules (and especially dbic schema)

Le lun. 21 sept. 2020 à 04:28, <dcook at prosentient.com.au> a écrit :
>
> Hi all,
>
>
>
> Does anyone else notice that koha-upgrade-schema runs extremely slowly, particularly when given a large list of instances, even when there are no upgrades to make?
>
>
>
> In theory, it should just return very quickly, because there are no schema upgrades to make.
>
>
>
> I haven’t looked into the code yet, but figured I’d put the question to the community.
>
>
>
> David Cook
>
> Software Engineer
>
> Prosentient Systems
>
> 72/330 Wattle St
>
> Ultimo, NSW 2007
>
> Australia
>
>
>
> Office: 02 9212 0899
>
> Online: 02 8005 0595
>
>
>
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha-community.org
> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : http://www.koha-community.org/ git : 
> http://git.koha-community.org/ bugs : http://bugs.koha-community.org/




More information about the Koha-devel mailing list