Some libraries have serials that have large numbers of items attached to the record, this can create problems when exporting/harvesting the records. One of the problems seems to be GetMarcBiblio which makes several db requests per item, many of these can be removed by adding a GetMarcItems routine to fetch several items rather than iterating over each biblionumber
Created attachment 76475 [details] [review] Bug 21006: Add GetMarcItems method and refactor GetMarcBiblio
Could you provide a patch with only the relevant changes (i.e. without indentation changes)?
Created attachment 76490 [details] [review] Bug 21006: Add GetMarcItems method and refactor GetMarcBiblio
just to add, testing with a bib with 50,000 items I saw the time for a call to GetMarcBiblio (with embed_items) go from ~135 seconds to ~18 seconds
After a quick look at the code, to test later: If item type at biblio level (item-level_itypes=0) then 952$y will not contain biblioitem.itemtype. However I am not sure this make sense...
Created attachment 76659 [details] [review] Bug 21006: Add unit tests for GetMarcItem To test: prove -v t/db_dependent/Items.t
Created attachment 76660 [details] [review] Bug 21006: Add GetMarcItems method and refactor GetMarcBiblio
Created attachment 76661 [details] [review] Bug 21006: Unit tests for GetMarcItems To test: prove -v t/db_dependent/Items.t
While this makes records with a large number of items faster, it slows down retrieval of records with only a few items. An alternative implementation in bug 20664.
Ere demonstrated the issue for me - at least my tests were useful - closing this in favor of his
*** This bug has been marked as a duplicate of bug 20664 ***