Tapestry 5.4 acquires a write lock on the session when reading attributes. This is to prevent race conditions if the attribute is mutable and modified from multiple threads.
If an attribute is immutable, the lock could be downgraded to a read lock.
The patch adds a MutabilityAnalyzer service that uses a contributable chain of command to check whether an object is immutable. The session locking code uses that service to downgrade the write lock if the HTTP handler thread only reads immutable attributes.