https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10662
--- Comment #221 from David Cook <[email protected]> --- (In reply to Josef Moravec from comment #211) > Comment on attachment 81783 [details] [review] > Bug 10662: Build OAI-PMH Harvesting Client > > Review of attachment 81783 [details] [review]: > ----------------------------------------------------------------- > > ::: Koha/OAI/Harvester/Worker/Download/Stream.pm > @@ +111,5 @@ > > + } > > + > > + #NOTE: Prepare database statement handle > > + my $dbh = C4::Context->dbh; > > + my $sql = "insert into oai_harvester_import_queue (uuid,result) VALUES > > (?,?)"; > > You should not use SQL in Koha modules, use > Koha::OAI::Harvester::ImportQueue->new in place of execution of this > statement Ordinarily, I would agree. However, Koha::Object[s] use DBIx::Class, which is very slow. If you read more of Koha::OAI::Harvester::Download::Stream, you'll see that I re-use the same prepared statement handle (something we unfortunately have never done in Koha), which makes the inserts much much much faster. Here I'm aiming for high performance. DBIx::Class was built for convenience rather than performance, so I've opted to use DBI and SQL, as it's just so much faster. As a side note, Tomas and I chatted a bit at Kohacon about making the harvester's workers use Koha's plugins, so perhaps this is something where the built-in for Koha could use DBIC, and I could provide a more high performance plugin outside of Koha. Although it seems a shame that we'd prefer low performance over high performance :/. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
