Skip to content

enable the new enhanced language detection by default

Warren Gifford requested to merge enable-by-default-enhanced-lang-stats into master

Created by: sqs

Tested on Sourcegraph.com and performance is acceptable.

For example, running this query:

query {
  repository(name:"github.com/microsoft/vscode") {
    commit(rev: "HEAD") {
      languageStatistics {
        name
        totalBytes
        totalLines
      }
    }
  }
}

without a cache took 6.1s. Because of how the results are cached (per-git object), recomputing the stats after subsequent commits is usually cheap (only changed git trees need to be recomputed).

There are currently no operations (other than manual API queries) that would cause this to be run across all repositories on an instance, or a large subset of all repositories, so the downsides of unexpectedly bad performance are low.

Closes #2587 (closed)

Merge request reports

Loading