vertx-web
vertx-web copied to clipboard
Adding new methods to manage the path params map
trafficstars
I've fallen into this while working on improving allocations for Quarkus:
- quarkus register several routes
- some of these routes, while iterated to find a match, hit https://github.com/vert-x3/vertx-web/blob/ed413097ca51eedc18db827c92f1514565e9b9b0/vertx-web/src/main/java/io/vertx/ext/web/impl/RouteState.java#L1225-L1230
- calling
pathParams, while stillnullcause allocating it
And, at the same time, most of the time, the path params are just 1 or 2; meaning that the allocated map doesn't need to have an initial capacity that big.