pull/2951/head
bunsenstraat 2 years ago
parent 0faf3f16d2
commit 1bc847019c
  1. 2
      apps/remix-ide/src/app/plugins/parser/services/code-parser-antlr-service.ts

@ -71,7 +71,7 @@ export default class CodeParserAntlrService {
setFileParsingState(file: string) { setFileParsingState(file: string) {
if (this.cache[file]) { if (this.cache[file]) {
if (this.cache[file].blockDurations && this.cache[file].blockDurations.length > (this.parserTrehsholdSampleAmount-1)) { if (this.cache[file].blockDurations && this.cache[file].blockDurations.length > this.parserTrehsholdSampleAmount) {
// calculate average of durations to determine if the parsing should be disabled // calculate average of durations to determine if the parsing should be disabled
const values = [...this.cache[file].blockDurations] const values = [...this.cache[file].blockDurations]
const average = values.reduce((a, b) => a + b, 0) / values.length const average = values.reduce((a, b) => a + b, 0) / values.length

Loading…
Cancel
Save