Improve theme caching in large instances

Description

In Confluence instances with many users accessing viewports at the same time, the current theme cache warmup can cause an increase in blocked database connections.
This happens because the warmup synchronizes all requests to viewport themes and blocks them until the warmup has been completed. During that time the respective threads hold onto their database connection and return them to the connection pool only after the warmup has been completed.
If the warmup takes several seconds this can easily deplete the DB connection pool.

Environment

None

Status

Assignee

Jens Rutschmann (K15t)

Reporter

Jens Rutschmann (K15t)

Labels

Participants

None

Deployment

None

Components

Sprint

None

Fix versions

Priority

Major