[Common][Package] Avoid recalling app_info_create() for consecutive calls 75/280875/3
authorPiotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
Tue, 6 Sep 2022 07:13:56 +0000 (09:13 +0200)
committerPiotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
Tue, 6 Sep 2022 12:56:15 +0000 (14:56 +0200)
commit9cdf2f38a5cd97f2ea400d6b390b3fd171d09d24
tree1d383f0ae6775f32426eb5a850a37b13b06b0908
parent5dd52ec52ab8e821d2d362db1869cc685b6d3290
[Common][Package] Avoid recalling app_info_create() for consecutive calls

app_info_create occasionally when the device is freshly reboot takes
much time to gather data (over 1 second), which causes a serious delay
when the function is called several times in the row without caching the
result.
This modification makes a single call of app_info_create() at first try
and then only return previously fetched value.

[Verification] Code compiles without errors.
TCT application, package, deprecated - passrate didn't change.

Change-Id: Ifc989d5eb0f7435f1a6451613d289d6d3851e979
src/common/tools.cc
src/package/package_info_provider.cc
src/package/package_info_provider.h