5 ms·
TLDR: Poorly written regexp causes performance problems: /^([hH][tT]{2}[pP]://|[hH][tT]{2}[pP][sS]://)(([A-Za-z0-9-~]+).)+([A-Za-z0-9-~\\\\/])+$/ instead of /
by lixtra 8y ago
TLDR:
Poorly written regexp causes performance problems:
/^([hH][tT]{2}[pP]://|[hH][tT]{2}[pP][sS]://)(([A-Za-z0-9-~]+).)+([A-Za-z0-9-~\\\\/])+$/
instead of
/(https?:.../i
I’m sure there exists proper java libraries to parse an URL.