optimise the initial size of the cgi scope

Description

the cgi scope has 47 elements, the default initial size for a struct is 32 elements, which means it’s always going to resize on every request, which is a somewhat expensive operation

doing some very rough hello-world benchmarks locally

32 - 9k requests per second

64 -11k requests per second

Attachments

1
  • 07 Nov 2024, 12:35 pm

Activity

Show:

Pothys - MitrahSoft 7 November 2024 at 13:47

I have investigated this ticket with Lucee version 6.2.0.155-SNAPSHOT. The DEFAULT_INITIAL_CAPACITY is now set to 64, and it works fine.

Zac Spitzer 7 November 2024 at 12:35

another nice win on the hello world benchmark!

image-20241107-123500.png

Zac Spitzer 6 November 2024 at 11:04

Fixed

Details

Assignee

Reporter

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

Fix versions

Priority

Created 6 November 2024 at 11:02
Updated 7 November 2024 at 13:48
Resolved 7 November 2024 at 13:48

Flag notifications