http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10584
--- Comment #13 from M. Tompsett <[email protected]> --- (In reply to Galen Charlton from comment #12) > I have concerns about the implementation of this -- in particular, for a bib > that is /not/ going to end up hidden, the acts of retrieving all of the > items and checking which ones are hidden occur /twice/. After looking for GetHiddenItems and GetItemsInfo, I see what you mean by twice. > In my opinion, this is likely to impose too high of a performance penalty > for typical OPACs, which don't have high numbers of hidden items. This is the opac-details.pl page, I have a hard time imagining tens of thousands of items. Daily Newspapers perhaps? 2N is still order N, but I do agree there is room for optimization. > Also, I'm not a fan of the notion of using 0 as a "magic" biblionumber -- to > bail out, just issue the redirect. I'm not a fan of multiple exits, but you have a valid point. Though, the magic bullet is already used in the case that no biblionumber is passed. > I suggest revising the patch so that rather than adding a call to > GetHiddenItems(), the bailing-out occurs after the original call to > GetHiddenItems(). The code is such that I can move and reuse the @hiddenitems in my patched code, and dump @items2hide. This reduces that to a single call. My concern is more about the GetItemsInfo double call, now that you pointed it out. I'm wondering about the "change back when I've fixed request.pl" comment from 2002. Can I effectively dump @itemsmatchingbiblionumber, and move @all_items into the patched area for use there too, deleting the comment? Or should I stick with a safer pushing the contents of @itemsmatchingbiblionumber to the @all_items, instead of the second call, so as to retain a hint of what the comment might be talking about? > Additional refactoring might be called for (but as the > topic of a separate bug) to minimize the processing gets wasted whether or > not the bib ends up hidden. I think a single line of code, "return () if (! $yaml =~ /\S/ );" or "return () unless $hidingrules;", in the GetHiddenItems code may be a tiny optimization of note, but agree that is best suited for another bug report. -- 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/
