[CF-14] improve servlet filter perf

This one is static. But the one in PrivateAttrsFilter is not. Can we make them consistent?