]> git.koha-community.org Git - koha.git/commit
Bug 13690: use Koha::Schema only when it's needed
authorJonathan Druart <jonathan.druart@biblibre.com>
Tue, 10 Feb 2015 10:34:10 +0000 (11:34 +0100)
committerChris Cormack <chrisc@catalyst.net.nz>
Sun, 22 Feb 2015 23:13:45 +0000 (12:13 +1300)
commit11287e0ad19d69175026b507ac8796988cfd0ab9
treeaadafb048596824a1c2f5b91f3d02d4f0f2aaa1d
parent01dc4bc0ced9e705b1e5c0d008b78770a1eef9a5
Bug 13690: use Koha::Schema only when it's needed

This patch makes Koha::Database lazy-load the whole Koha::Schema libraries.
It doesn't seem to have negative effects, and makes scripts not using
DBIx::Class notably faster [1].

Regards

[1] If you read the DBIx::Class::Schema docs, it explains that it it uses
Module::Find to load all schema files...
http://search.cpan.org/~ribasushi/DBIx-Class-0.082810/lib/DBIx/Class/Schema.pm#load_namespaces

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Happy to sign this one. The only extra comment would be that DBIx::Class
performance issues remain after this patch, but is being handled in a
different bug.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c52bc9756a5fa1e4f6bba7ce5c58124f150c5efc)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Koha/Database.pm