Optimize perm_begin and perm_end
authorPiotr Bartosiewicz <p.bartosiewi@partner.samsung.com>
Wed, 27 Nov 2013 15:10:25 +0000 (16:10 +0100)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Mon, 9 Dec 2013 19:38:50 +0000 (20:38 +0100)
commitc24c50b444a39ee8aa945c71a2fbf0ba85ab1cdc
tree4315f6380af0599bced7ccc9cb90d04a826f5885
parent8a2d28faea7a297ed72440145ea2beeb2a18e0a0
Optimize perm_begin and perm_end

[Issue#]        SSDWSSP-596
[Bug/Feature]   Database operations executed in perm_begin and perm_end
                are very slow.
[Cause]         All the rules were calculated every perm_end.
[Solution]      Calculate only modified rules.
[Verification]  Build, install, run tests - to check correctness.
                Compare speed of application installation and
                deinstallation before and after library update.
                Make sure a database is exactly the same as in new
                image (running our tests adds a lot of new rules).
                I've notices 2x - 7x speedup (depending on the number of
                modified rules).

Change-Id: Ifba86c1c8b09230458482c9c31468245bf3edbbb
db/load-rules-db.sql
db/rules-db.sql
db/updates/update-rules-db-data-to-v3.sql
db/updates/update-rules-db-to-v3.sql
include/rules-db-internals.h
src/rules-db-internals.c
src/rules-db.c