Open pferraro opened 3 years ago
Hi All can i know in which release above fix will be available as i am facing the same issue mentioned above
Spring Session works great for session management but noticed lot of slowness because of this known issue. This is very urgent issue and blocker. Is there any official release date for this?
All this is a significant impact to performance for spring with apps that are using session management, Any chance we will see this fix pushed to the master branch in the next week or so.
Thanks in advance.
This issue impacts the performance for large JSPs which has jsp:include where it tries to commit on each include but due to session getting cleared and call to getRequestedSessionId makes getSessionQuery again.
Describe the bug For a valid session, SessionRepositoryFilter.SessionRepositoryRequestWrapper.commitSession() does the following:
However, since #1 already cleared the requested session cached values #3 requires a completely redundant call to SessionRepository.findById(...). Depending on the implementation, this can be unnecessarily expensive.
To Reproduce Use a tracer to detect calls to SessionRepository.findById(...). For a requested session, this is triggered twice, once at the beginning of the request, and again after the session is saved.
Expected behavior SessionRepository.findById(...) should be considered a potentially expensive operation, and only triggered when necessary. Clearing cached values after determining whether to send the session ID to the client (i.e. in a finally block) would solve the problem.