summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-02-09 19:18:08 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-02-09 19:18:08 +0000
commit7d50c0354fbcf7d4721f19bdf88286b56484eddb (patch)
treee5a9ce1a0ab3843ed925df44ccc3e0dd19f24250 /src
parentaead1abef55aa88d19bf8b7b5c30b1b0d0255b0b (diff)
downloadlibcss-7d50c0354fbcf7d4721f19bdf88286b56484eddb.tar.gz
libcss-7d50c0354fbcf7d4721f19bdf88286b56484eddb.tar.bz2
Musings about a potential optimisation
svn path=/trunk/libcss/; revision=6405
Diffstat (limited to 'src')
-rw-r--r--src/select/select.c6
1 files changed, 6 insertions, 0 deletions
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 */