OpenNTF / openliberty-domino

Open Liberty server embedded in Domino
Apache License 2.0
7 stars 3 forks source link

Investigate optimized routines for ReverseProxyHttpService matching #70

Open jesse-gallagher opened 3 years ago

jesse-gallagher commented 3 years ago

Currently, the isXspUrl and doService methods use a test like this to identify matches:

String pathInfo = getChompedPathInfo(fullPath);
boolean match = this.targets.keySet().stream()
    .anyMatch(contextRoot -> pathInfo.equals(contextRoot) || pathInfo.startsWith(contextRoot + '/'));

While that's fine, this is a performance-sensitive bit of code, and so it might be worth it to investigate a more-optimized routine for this, like what I think Undertow does internally.