spring-framework icon indicating copy to clipboard operation
spring-framework copied to clipboard

ResourceUrlEncodingFilter cache misses are expensive

Open dsyer opened this issue 1 year ago • 4 comments

A PetClinic user noticed this (https://github.com/spring-projects/spring-petclinic/issues/1732). For me it's a 2x throughput degradation on the home page of PetClinic, for the user that reported the issue it was 4x. The problem seems to be that ResourceUrlEncodingFilter has a CachingResourceResolver in it that works great for actual classpath resources. Conversely, links that are not static resources are cache misses, and they have to be checked every time in case they are, after all, on the classpath (e.g. links to other pages in the app).

dsyer avatar Dec 03 '24 17:12 dsyer