From 128da973dfe217afbf609e1e27c6e3843ed81f2c Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 21 Nov 2009 21:53:06 +0000 Subject: [PATCH] Truing to use JS `eval' in several ways doesn't seem to be doing anything for speed. So dump all attempts at making things faster this way. Also, it seems that things are responsive enough with any break in the searching "thread", so shorten that time. (And one other random optimization: abort early when an item doesn't match.) svn: r16943 --- collects/scribblings/main/private/search.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/collects/scribblings/main/private/search.js b/collects/scribblings/main/private/search.js index 999009634a..6fe21b2e81 100644 --- a/collects/scribblings/main/private/search.js +++ b/collects/scribblings/main/private/search.js @@ -439,20 +439,21 @@ function Search(data, term, is_pre, K) { var r, min = C_max, max = C_min; for (var j=0; j= C_rexact && min >= C_exact) exacts.push(data[i]); else if (min > C_wordmatch) matches.push(data[i]); else if (min > C_fail) wordmatches.push(data[i]); fuel--; i++; } - if (i