History

Optimize search

Thibaut committed 12 years ago

Commit a3aa03b1 parent 50c18b22 files · +115 −97Browse files

Showing the changes to assets/javascripts/debug.js.coffee (1 of 2 files). Show all

Unified · Split

assets/javascripts/debug.js.coffee+6−6
@@ -35,15 +35,15 @@ app.Searcher = -> · 34 unmodified lines
35 _match = @match.bind(@)35 _match = @match.bind(@)
36 @match = =>36 @match = =>
37 if @matcher37 if @matcher
38 console.timeEnd @matcher38 console.timeEnd @matcher.name
39 if @matcher is 'exactMatch'39 if @matcher.name is 'exactMatch'
40 for entries, score in @scoreMap by -1 when entries40 for entries, score in @scoreMap by -1 when entries
41 console.log '' + score + ': ' + entries.map((entry) -> entry.text).join("\n ")41 console.log '' + score + ': ' + entries.map((entry) -> entry.text).join("\n ")
42 _match()42 _match()
43 43
44 _setupMatcher = @setupMatcher.bind(@)44 _setupMatcher = @setupMatcher.bind(@)
45 @setupMatcher = ->45 @setupMatcher = ->
46 console.time @matcher46 console.time @matcher.name
47 _setupMatcher()47 _setupMatcher()
48 48
49 _end = @end.bind(@)49 _end = @end.bind(@)
@@ -56,7 +56,7 @@ app.Searcher = -> · 6 unmodified lines
56 _kill = @kill.bind(@)56 _kill = @kill.bind(@)
57 @kill = ->57 @kill = ->
58 if @timeout58 if @timeout
59 console.timeEnd @matcher if @matcher59 console.timeEnd @matcher.name if @matcher
60 console.groupEnd()60 console.groupEnd()
61 console.timeEnd 'Total'61 console.timeEnd 'Total'
62 console.warn 'Killed'62 console.warn 'Killed'