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
3535 _match = @match.bind(@)
3636 @match = =>
3737 if @matcher
38− console.timeEnd @matcher
39− if @matcher is 'exactMatch'
40− for entries, score in @scoreMap by -1 when entries
41− console.log '' + score + ': ' + entries.map((entry) -> entry.text).join("\n ")
38+ console.timeEnd @matcher.name
39+ if @matcher.name is 'exactMatch'
40+ for entries, score in @scoreMap by -1 when entries
41+ console.log '' + score + ': ' + entries.map((entry) -> entry.text).join("\n ")
4242 _match()
4343
4444 _setupMatcher = @setupMatcher.bind(@)
4545 @setupMatcher = ->
46− console.time @matcher
46+ console.time @matcher.name
4747 _setupMatcher()
4848
4949 _end = @end.bind(@)
@@ -56,7 +56,7 @@ app.Searcher = -> · 6 unmodified lines
5656 _kill = @kill.bind(@)
5757 @kill = ->
5858 if @timeout
59− console.timeEnd @matcher if @matcher
59+ console.timeEnd @matcher.name if @matcher
6060 console.groupEnd()
6161 console.timeEnd 'Total'
6262 console.warn 'Killed'