sharesec: Fix execution delay for large number of shares
sharesec utility takes more time to finish in case of large number of shares.
The utility loads registry along with all shares info on every invocation, however it does not use any of that information apart from checking existence of share by its name. Therefore as number of shares increases it starts taking more time.
As a fix, we define and use function which would load registry but not share info, this shall ensure all lp_() functions would work without any issue and avoid delay regardless of number of shares. And another function which shall check existence of share by directly checking from registry or config file using appropriate APIs.
Checklist
-
Commits have Signed-off-by:
with name/author being identical to the commit author -
(optional) This MR is just one part towards a larger feature. -
(optional, if backport required) Bugzilla bug filed and BUG:
tag added -
Test suite updated with functionality tests -
Test suite updated with negative tests -
Documentation updated -
CI timeout is 3h or higher (see Settings/CICD/General pipelines/ Timeout)
Reviewer's checklist:
-
There is a test suite reasonably covering new functionality or modifications -
Function naming, parameters, return values, types, etc., are consistent and according to README.Coding.md
-
This feature/change has adequate documentation added -
No obvious mistakes in the code
Edited by Anoop C S