vertx-web icon indicating copy to clipboard operation
vertx-web copied to clipboard

Adding new methods to manage the path params map

Open franz1981 opened this issue 1 year ago • 2 comments
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 still null cause 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.

franz1981 avatar Sep 05 '24 15:09 franz1981