aboutcode-org / aboutcode-org/scancode-toolkit

Timeout when scanning very large JS file with large arrays of numbers

Offen
#2,770 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
performance
Vorherrschende Sprache
Python
Sterne
2.6k
Forks
791
Ø Merge
1 T. 12 Std.
Gemergte PRs (30 T.)
5

Beschreibung

In Apache JMeter, this file https://github.com/apache/jmeter/blob/c98be3f40009caffb8b66aded702356d975bb4d7/bin/report-template/content/js/graph.js.fmkr is a Freemarker template used to generate a "graph.js" JS file that can contain large images serialized arrays of digits and time series arrays with large number of integer or float values.
This is not specific to JS or JMeter. Go programs routinely embed data files, and C crypto code routinely contains generated tables of numbers or byte as hex-encoded values used either to speed up processing or as the basic for encryption.

These can be the source of scan timeouts (I have seen some generated arrays several MB big).

We should ignore these for scanning as they contain no data of value (short of being decoded which is else entirely).
But also be careful and mindful that other use cases (such as detection of cryptographic code) may need these number arrays.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.