]> git.ipfire.org Git - people/stevee/pakfire.git/commit - src/libpakfire/parser.c
parser: Improve performance of expanding strings
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 3 Mar 2021 11:43:20 +0000 (11:43 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 3 Mar 2021 11:43:20 +0000 (11:43 +0000)
commit38fa33053a17a0eead459816471dd787366fbdaf
tree0cd4bebfce3d0a77631f0be2074239dd2db92dcf
parent2dd267d4243ac70ac3b28a3bba391a3659a5bc3c
parser: Improve performance of expanding strings

By using pakfire_string_replace, all occurrences of a variable will be
replaced at once until no variables are being left.

It can still happen, that the same variable is being matched later again
(multiple times even), but it looks to me like adding any caching
mechanism adds a lot more overhead.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/parser.c