Bug 25889

Summary: Increase performance of debian/list-deps script
Product: Koha Reporter: Mason James <mtj>
Component: PackagingAssignee: Mason James <mtj>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: aleisha, jonathan.druart, lucas, martin.renvoize, mtj, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.03
Attachments: Bug 25889: Increase performance of debian/list-deps script
Bug 25889: Increase performance of debian/list-deps script
Bug 25889: Increase performance of debian/list-deps script

Description Mason James 2020-06-29 01:35:13 UTC
This patch attempts to increase performance of debian/list-deps script, using Parallel::ForkManager
Comment 2 Mason James 2020-06-29 02:10:47 UTC
Created attachment 106370 [details] [review]
Bug 25889: Increase performance of debian/list-deps script

to test... (on a i7-2600 vm with 8 cores)

1/ run script, note execution time
    $ time ./debian/update-control
    real    8m5.000s

2/ copy old file
    $ cp ./debian/control control.old

3/ apply patch

4/ run updated script, note execution time is smaller
    $ time ./debian/update-control
    real    2m14.000s

5/ copy new file
    $ cp ./debian/control control.new

6/ confirm old and new control files are identical
    $ diff control.old control.new | wc -l
    0
Comment 3 Jonathan Druart 2020-07-24 12:05:54 UTC
The difference is not as good for me (4x) but it's better with the pach
real    5m35.517s
real    7m10.086s
Comment 4 Jonathan Druart 2020-07-24 13:02:13 UTC
Created attachment 107345 [details] [review]
Bug 25889: Increase performance of debian/list-deps script

to test... (on a i7-2600 vm with 8 cores)

1/ run script, note execution time
    $ time ./debian/update-control
    real    8m5.000s

2/ copy old file
    $ cp ./debian/control control.old

3/ apply patch

4/ run updated script, note execution time is smaller
    $ time ./debian/update-control
    real    2m14.000s

5/ copy new file
    $ cp ./debian/control control.new

6/ confirm old and new control files are identical
    $ diff control.old control.new | wc -l
    0

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Jonathan Druart 2020-07-24 15:02:34 UTC
Skipping QA.
Comment 6 Jonathan Druart 2020-07-24 15:02:56 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 7 Lucas Gass 2020-07-31 20:28:59 UTC
backported to 20.05.x for 20.05.03
Comment 8 Aleisha Amohia 2020-08-03 23:42:24 UTC
enhancement, not backported to 19.11.x