From ae2fef2c05bd7e875b4a84e584a183b027f53356 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Wed, 16 Jan 2013 16:42:48 -0800 Subject: Greatly simplify circular Requires checking Instead of keeping of list of packages in the current Requires chain and searching it repeatedly, just mark each package as part of the chain or not. This nearly cuts in half the time on a particularly rough torture test I have. --- pkg.h | 1 + 1 file changed, 1 insertion(+) (limited to 'pkg.h') diff --git a/pkg.h b/pkg.h index e12aab2..5ead2a6 100644 --- a/pkg.h +++ b/pkg.h @@ -80,6 +80,7 @@ struct _Package int path_position; /* used to order packages by position in path of their .pc file, lower number means earlier in path */ int libs_num; /* Number of times the "Libs" header has been seen */ int libs_private_num; /* Number of times the "Libs.private" header has been seen */ + gboolean in_requires_chain; /* package is in current Requires chain */ }; Package *get_package (const char *name); -- cgit v1.2.1