Bug 23407 - XSLT Details pages don't use items, we shouldn't pass them
Summary: XSLT Details pages don't use items, we shouldn't pass them
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-31 20:14 UTC by Nick Clemens
Modified: 2019-08-07 14:30 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 23407: Don't process items for XSLT on details pages (1.55 KB, patch)
2019-07-31 20:19 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 23407: Don't process items for staff results either (1.15 KB, patch)
2019-08-01 18:47 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 23407: Don't process items for XSLT on details pages (1.71 KB, patch)
2019-08-07 14:22 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2019-07-31 20:14:27 UTC
C4::XSLT::XSLTParse4Display calls buildKohaItemsNamespace() for all displays

For IntranetDetails and OPACDetails there is no item processing.

Removing this call can save us time
Comment 1 Nick Clemens 2019-07-31 20:19:26 UTC
Created attachment 91900 [details] [review]
Bug 23407: Don't process items for XSLT on details pages

To test:
1 - Add 1000 items to a record
    Go to biblio
    Edit items
    Add multiple copies of this item
    Add 1000 and confirm
    Wait..
2 - Load the record in staff client and OPAC, note how long it takes
    Press F12 in browser to open the console
    use the Network tab of the console
    note th eload time
    refresh a few times to see average time
3 - Apply patch
4 - Restart all the things
5 - Reload the record in staff and opac
6 - Note decresed time
7 - Verify nothing on the page has changed

QA can grep the standard XSLT files for details pages for 'item' to note occurences do not use items information
Comment 2 Nick Clemens 2019-08-01 18:47:31 UTC
Created attachment 91916 [details] [review]
Bug 23407: Don't process items for staff results either

We also don't use the items here, same test plan but on staff cleint results, should see no change
Comment 3 Owen Leonard 2019-08-04 16:58:11 UTC
This worked as advertised but I got this warning from the qa tool:

 FAIL	C4/XSLT.pm
   FAIL	  critic
		# Variables::ProhibitConditionalDeclarations: Got 1 violation(s).
Comment 4 Nick Clemens 2019-08-07 14:22:41 UTC
Created attachment 92045 [details] [review]
Bug 23407: Don't process items for XSLT on details pages

To test:
1 - Add 1000 items to a record
    Go to biblio
    Edit items
    Add multiple copies of this item
    Add 1000 and confirm
    Wait..
2 - Load the record in staff client and OPAC, note how long it takes
    Press F12 in browser to open the console
    use the Network tab of the console
    note the load time
    refresh a few times to see average time
3 - Apply patch
4 - Restart all the things
5 - Reload the record in staff and opac
6 - Note decresed time
7 - Verify nothing on the page has changed

QA can grep the standard XSLT files for details pages for 'item' to note occurences do not use items information