request access scope is syncronized

Description

I noticed there was a lot of hashmap resizing going on running thread tests

https://github.com/lucee/Lucee/blob/6.2/core/src/main/java/lucee/runtime/net/http/HttpUtil.java#L59

due to the request scope having a lot of items (1030) from various tests including

LDEV-947: cfsavecontent & cfinclude - java.util.ConcurrentModificationExceptionDeployed

which added 1000 items to the request scope, which i cleaned up, but it also made the request scope synchronized

https://github.com/lucee/Lucee/commit/570dd85a31fded78afd8e9ff549704fdc3c90820

but due to the initial size being 32 items, the resizing of the hash is being done synchronized

just cleaning up that scope between tests made the test suite run 50s faster

  1. this doesn’t need to be syncronized

  2. the initial capacity for the cloned request scopes should be large enough to fit all the items

Environment

None

Attachments

6
  • 27 Dec 2024, 09:48 am
  • 27 Dec 2024, 09:48 am
  • 27 Dec 2024, 09:48 am
  • 27 Dec 2024, 09:48 am
  • 27 Dec 2024, 09:48 am
  • 27 Dec 2024, 09:48 am

Activity

Show:

Zac Spitzer 27 December 2024 at 09:48

before

image-20241227-092146.png
image-20241227-092202.png
image-20241227-092226.png

after

image-20241227-093029.png
image-20241227-093053.png

 

image-20241227-094803.png
Fixed

Details

Assignee

Reporter

Priority

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Created 6 November 2024 at 17:54
Updated 6 January 2025 at 17:06
Resolved 6 January 2025 at 17:06

Flag notifications