From 7d50c0354fbcf7d4721f19bdf88286b56484eddb Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Mon, 9 Feb 2009 19:18:08 +0000 Subject: Musings about a potential optimisation svn path=/trunk/libcss/; revision=6405 --- src/select/select.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/select/select.c') diff --git a/src/select/select.c b/src/select/select.c index 687be85..f6ff8c3 100644 --- a/src/select/select.c +++ b/src/select/select.c @@ -602,6 +602,12 @@ css_error match_details(css_select_ctx *ctx, void *node, { css_error error; + /** \todo Some details are easier to test than others (e.g. dashmatch + * actually requires looking at data rather than simply comparing + * pointers). Should we consider sorting the detail list such that the + * simpler details come first (and thus the expensive match routines + * can be avoided unless absolutely necessary). */ + while (detail->next != 0) { /* Don't bother with the first detail, as it's the * element selector */ -- cgit v1.2.3