This PR improves the speed of read_geopkg function, with below changes. :
(It improve the Duration by 20% and CPU Time by 50%)
Optimized Parallel Processing.
Used min(cpu_pool, len(layers)) to ensure we don't create more parallel jobs than layers, which avoids unnecessary overhead.
Reduced Repetition:
Removed repeated code for reading layers by creating a read_layer function.
Ensured Efficiency:
Removed unnecessary list creation and directly accessed the table_dict.
Additions
-
Removals
-
Changes
Originally it was taking 2.47 sec
after the changes it takes 1.96 sec which is 20% improvement:
Testing
1.
Screenshots
Notes
-
Todos
-
Checklist
[ ] PR has an informative and human-readable title
[ ] Changes are limited to a single goal (no scope creep)
[ ] Code can be automatically merged (no conflicts)
[ ] Code follows project standards (link if applicable)
[ ] Passes all existing automated tests
[ ] Any change in functionality is tested
[ ] New functions are documented (with a description, list of inputs, and expected output)
[ ] Placeholder code is flagged / future todos are captured in comments
[ ] Visually tested in supported browsers and devices (see checklist below :point_down:)
[ ] Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
[ ] Reviewers requested with the Reviewers tool :arrow_right:
This PR improves the speed of
read_geopkg
function, with below changes. : (It improve theDuration
by 20% andCPU Time
by 50%)Optimized Parallel Processing. Used
min(cpu_pool, len(layers))
to ensure we don't create more parallel jobs than layers, which avoids unnecessary overhead.Reduced Repetition: Removed repeated code for reading layers by creating a
read_layer
function.Ensured Efficiency: Removed unnecessary list creation and directly accessed the
table_dict
.Additions
-
Removals
-
Changes
Originally it was taking 2.47 sec
after the changes it takes 1.96 sec which is 20% improvement:
Testing
1.
Screenshots
Notes
-
Todos
-
Checklist
Testing checklist
Target Environment support
Accessibility
Other