[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 --- Comment #14 from Jonathan Druart --- (In reply to Julian Maurice from comment #8) > (In reply to Jonathan Druart from comment #7) > > You are mixing unblessed and blessed in budget_owner. > > The logged in patron will be a hashref and others will be Koha::Patron > > objects. > No ? The %patrons hash only contains Koha::Patron object. $loggedinpatron is > a hashref but it's not in the %patrons hash and is not used for > budget_owner, only as a CanUserUseBudget parameter. Yes, sorry, it seems that I misread something! -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 Martin Renvoize changed: What|Removed |Added Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 Martin Renvoize changed: What|Removed |Added CC||n...@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 Martin Renvoize changed: What|Removed |Added QA Contact|testo...@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 Martin Renvoize changed: What|Removed |Added Status|Signed Off |Passed QA CC||martin.renvoize@ptfs-europe ||.com -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 Martin Renvoize changed: What|Removed |Added Attachment #163336|0 |1 is obsolete|| --- Comment #13 from Martin Renvoize --- Created attachment 163337 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163337=edit Bug 35921: Improve perfs of acqui-home.pl when there are many budgets When there are a lot of budgets with the same owner, most of the time of acqui-home.pl is spent loading the same patron over and over. This patch makes sure each borrower is loaded only once. Test plan: 0. Do not apply the patch yet 1. Create a thousand budgets with the following command (make sure the budget_owner_id is an existing borrowernumber): perl -MKoha::Database -e ' my $schema = Koha::Database->schema; my $period = $schema->resultset("Aqbudgetperiod")->create({ budget_period_startdate => "2000-01-01", budget_period_enddate => "2999-12-31" }); $schema->resultset("Aqbudget")->create({ budget_owner_id => 1, budget_period_id => $period->id }) for (1..1000) ' 2. Measure the time it takes to load acqui/acqui-home.pl (do it several times and keep the average time) 3. Apply the patch 4. Repeat step 2 Signed-off-by: Pedro Amorim Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Martin Renvoize -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 Martin Renvoize changed: What|Removed |Added Attachment #163288|0 |1 is obsolete|| --- Comment #12 from Martin Renvoize --- Created attachment 163336 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163336=edit Bug 35921: Improve perfs of acqui-home.pl when there are many budgets When there are a lot of budgets with the same owner, most of the time of acqui-home.pl is spent loading the same patron over and over. This patch makes sure each borrower is loaded only once. Test plan: 0. Do not apply the patch yet 1. Create a thousand budgets with the following command (make sure the budget_owner_id is an existing borrowernumber): perl -MKoha::Database -e ' my $schema = Koha::Database->schema; my $period = $schema->resultset("Aqbudgetperiod")->create({ budget_period_startdate => "2000-01-01", budget_period_enddate => "2999-12-31" }); $schema->resultset("Aqbudget")->create({ budget_owner_id => 1, budget_period_id => $period->id }) for (1..1000) ' 2. Measure the time it takes to load acqui/acqui-home.pl (do it several times and keep the average time) 3. Apply the patch 4. Repeat step 2 Signed-off-by: Pedro Amorim Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Martin Renvoize -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 --- Comment #11 from Victor Grousset/tuxayo --- It works! :) Nice improvement, 11 sec vs 21.5 sec Adding a second signoff. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 Victor Grousset/tuxayo changed: What|Removed |Added Attachment #162372|0 |1 is obsolete|| --- Comment #10 from Victor Grousset/tuxayo --- Created attachment 163288 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163288=edit Bug 35921: Improve perfs of acqui-home.pl when there are many budgets When there are a lot of budgets with the same owner, most of the time of acqui-home.pl is spent loading the same patron over and over. This patch makes sure each borrower is loaded only once. Test plan: 0. Do not apply the patch yet 1. Create a thousand budgets with the following command (make sure the budget_owner_id is an existing borrowernumber): perl -MKoha::Database -e ' my $schema = Koha::Database->schema; my $period = $schema->resultset("Aqbudgetperiod")->create({ budget_period_startdate => "2000-01-01", budget_period_enddate => "2999-12-31" }); $schema->resultset("Aqbudget")->create({ budget_owner_id => 1, budget_period_id => $period->id }) for (1..1000) ' 2. Measure the time it takes to load acqui/acqui-home.pl (do it several times and keep the average time) 3. Apply the patch 4. Repeat step 2 Signed-off-by: Pedro Amorim Signed-off-by: Victor Grousset/tuxayo -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 Victor Grousset/tuxayo changed: What|Removed |Added CC||vic...@tuxayo.net --- Comment #9 from Victor Grousset/tuxayo --- (In reply to Jonathan Druart from comment #7) > You are mixing unblessed and blessed in budget_owner. (In reply to Julian Maurice from comment #8) > The %patrons hash only contains Koha::Patron object. I seems that's indeed the case, dumping %patrons: > $VAR2 = undef; > $VAR3 = '1'; > $VAR4 = bless( { > [...] > }, 'Koha::Patron' ); > $VAR5 = '51'; > $VAR6 = bless( { > [...] > }, 'Koha::Patron' ); -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 Julian Maurice changed: What|Removed |Added Status|Failed QA |Signed Off --- Comment #8 from Julian Maurice --- (In reply to Jonathan Druart from comment #7) > You are mixing unblessed and blessed in budget_owner. > The logged in patron will be a hashref and others will be Koha::Patron > objects. No ? The %patrons hash only contains Koha::Patron object. $loggedinpatron is a hashref but it's not in the %patrons hash and is not used for budget_owner, only as a CanUserUseBudget parameter. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 Jonathan Druart changed: What|Removed |Added Status|Signed Off |Failed QA CC||jonathan.druart+koha@gmail. ||com --- Comment #7 from Jonathan Druart --- You are mixing unblessed and blessed in budget_owner. The logged in patron will be a hashref and others will be Koha::Patron objects. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 --- Comment #6 from Pedro Amorim --- (In reply to Julian Maurice from comment #5) > (In reply to Pedro Amorim from comment #4) > > Hi Julian, I've SOed and provided a follow-up. > > Please take a look and see if you agree, or make it obsolete if not. > There is a small difference between your code and mine: in yours, if > budget_owner_id does not correspond to an existing borrower, it will > repeatedly try to fetch it. As there is no foreign key constraint on > budget_owner_id, it can happen. > Quite an edge case, but certainly possible. > I'll let QA decide No, you're right. The point of the patch was to optimize code without changing behavior, but it does. I've made it obsolete! -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 Pedro Amorim changed: What|Removed |Added Attachment #162373|0 |1 is obsolete|| -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 --- Comment #5 from Julian Maurice --- (In reply to Pedro Amorim from comment #4) > Hi Julian, I've SOed and provided a follow-up. > Please take a look and see if you agree, or make it obsolete if not. There is a small difference between your code and mine: in yours, if budget_owner_id does not correspond to an existing borrower, it will repeatedly try to fetch it. As there is no foreign key constraint on budget_owner_id, it can happen. Quite an edge case, but certainly possible. I'll let QA decide -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 Pedro Amorim changed: What|Removed |Added CC||pedro.amo...@ptfs-europe.co ||m --- Comment #4 from Pedro Amorim --- Hi Julian, I've SOed and provided a follow-up. Please take a look and see if you agree, or make it obsolete if not. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 --- Comment #3 from Pedro Amorim --- Created attachment 162373 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162373=edit Bug 35921: (QA follow-up): Less code, less nested code Signed-off-by: Pedro Amorim -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 Pedro Amorim changed: What|Removed |Added Attachment #161546|0 |1 is obsolete|| --- Comment #2 from Pedro Amorim --- Created attachment 162372 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162372=edit Bug 35921: Improve perfs of acqui-home.pl when there are many budgets When there are a lot of budgets with the same owner, most of the time of acqui-home.pl is spent loading the same patron over and over. This patch makes sure each borrower is loaded only once. Test plan: 0. Do not apply the patch yet 1. Create a thousand budgets with the following command (make sure the budget_owner_id is an existing borrowernumber): perl -MKoha::Database -e ' my $schema = Koha::Database->schema; my $period = $schema->resultset("Aqbudgetperiod")->create({ budget_period_startdate => "2000-01-01", budget_period_enddate => "2999-12-31" }); $schema->resultset("Aqbudget")->create({ budget_owner_id => 1, budget_period_id => $period->id }) for (1..1000) ' 2. Measure the time it takes to load acqui/acqui-home.pl (do it several times and keep the average time) 3. Apply the patch 4. Repeat step 2 Signed-off-by: Pedro Amorim -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 Pedro Amorim changed: What|Removed |Added Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 Fridolin Somers changed: What|Removed |Added Blocks||7923 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7923 [Bug 7923] Performance omnibus -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 Fridolin Somers changed: What|Removed |Added See Also||https://bugs.koha-community ||.org/bugzilla3/show_bug.cgi ||?id=36155 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 Fridolin Somers changed: What|Removed |Added See Also||https://bugs.koha-community ||.org/bugzilla3/show_bug.cgi ||?id=32377 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 Fridolin Somers changed: What|Removed |Added CC||fridolin.som...@biblibre.co ||m -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 Julian Maurice changed: What|Removed |Added Status|ASSIGNED|Needs Signoff -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 35921] Improve perfs of acqui-home.pl when there are many budgets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921 --- Comment #1 from Julian Maurice --- Created attachment 161546 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161546=edit Bug 35921: Improve perfs of acqui-home.pl when there are many budgets When there are a lot of budgets with the same owner, most of the time of acqui-home.pl is spent loading the same patron over and over. This patch makes sure each borrower is loaded only once. Test plan: 0. Do not apply the patch yet 1. Create a thousand budgets with the following command (make sure the budget_owner_id is an existing borrowernumber): perl -MKoha::Database -e ' my $schema = Koha::Database->schema; my $period = $schema->resultset("Aqbudgetperiod")->create({ budget_period_startdate => "2000-01-01", budget_period_enddate => "2999-12-31" }); $schema->resultset("Aqbudget")->create({ budget_owner_id => 1, budget_period_id => $period->id }) for (1..1000) ' 2. Measure the time it takes to load acqui/acqui-home.pl (do it several times and keep the average time) 3. Apply the patch 4. Repeat step 2 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/