Skip to content

Include go-license-detector performance patch in fork

Sami Hiltunen requested to merge smh-license-performance into master

The library is using a regex to split files from possible first lines of licenses. It uses normalized first line's from known licenses to build the regex. The problem is that App-s2p.txt license's first line normalizes into an empty line, which causes the regex to match every line beginning and ending. Each split is treated as a possible license candidate and analyzed. This has a drastic effect on performance as any large files that look like possible licenses will have the logic run for each line. This commit solves the problem by dropping the problematic license from the first line regex. Proper fix would be better but this allows us to test the effect on performance faster.

This changes our fork to point to a version that contains the fix for the performance issue. The fork is otherwise the same.

Related to #4761 (closed)

Merge request reports