A user of ParameterFilter had an unresponsive UI; the thread dump revealed several HTTP handling threads (e.g. GET /) busy as follows:
While I am not sure whether matchAllBuilds was set in this case, inspecting the code of matchesBuildValue shows that it could be quite expensive when run against a job with hundreds or thousands of build records. This is doubly true in Jenkins 1.485+ where build records are lazily loaded, so doing a search like this could cause a great deal of activity to occur loading build.xml from disk, increasing memory as well—and soft reference eviction could mean that this needs to be done repeatedly.
Would be better for matchAllBuilds to be replaced with an int limit >= 1, so that users could put a cap on how many builds would be consulted before giving up.
It may also be useful to cache information about matches, since parameters of build records should be immutable once the build is complete.
|Field||Original Value||New Value|
|Resolution||Fixed [ 1 ]|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Workflow||JNJira [ 148776 ]||JNJira + In-Review [ 192867 ]|