diff --git a/swh/web/assets/src/bundles/browse/origin-search.js b/swh/web/assets/src/bundles/browse/origin-search.js --- a/swh/web/assets/src/bundles/browse/origin-search.js +++ b/swh/web/assets/src/bundles/browse/origin-search.js @@ -97,10 +97,12 @@ for (let i = 0; i < patternsArray.length; ++i) { patternsArray[i] = escapeStringRegexp(patternsArray[i]); } - let patternsPermut = []; - heapsPermute(patternsArray, p => patternsPermut.push(p.join('.*'))); - let regex = patternsPermut.join('|'); - baseSearchUrl = Urls.browse_origin_search(regex) + `?regexp=true`; + if (patternsArray.length < 9) { + let patternsPermut = []; + heapsPermute(patternsArray, p => patternsPermut.push(p.join('.*'))); + let regex = patternsPermut.join('|'); + baseSearchUrl = Urls.browse_origin_search(regex) + `?regexp=true`; + } } let withVisit = $('#swh-search-origins-with-visit').prop('checked');