https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38408 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to David Cook from comment #4)
1. Is there are a reason you moved around a bunch of the top "use" statements? It makes it harder to see what's actually changed at the top.
It was kind of disorganized, and perltidy was also complaining. So I rearranged a bit more than strictly needed. But nothing special.
2. There's a 'my $chunk_size = 100000;' at the top of the script which appears to be unused? True. See the follow-up bug. Just a remainder of something obsoleted during dev.
3. It wouldn't hurt to add some more code comments to make it easier to read/understand what's happening. Not sure that I follow the math when just reading the code. I would've expected chunk_size to stay fixed and $num_records_exported to be the number of records actually exported. Not sure this all adds up... but don't have time to test right now.
I tried to put some extra comments in the main loop. The tricky thing is that the loop inside is normally the child, but could be the parent too if you dont fork. I am using chunk_size to control the loop; so it is adjusted before the last run. Added a TODO on the follow-up bug about passing data from child back to parent. -- You are receiving this mail because: You are watching all bug changes.