reduce default session size

Description

a default cfml session look like this, it’s only created if the session scope is referenced

Most of the traffic on the internet is bots, who don’t even use sessions

the url token, is simply the CFTOKEN and cfid as a url string, which could be automatically derived if ever used?

leaving this field empty reduces the size of the initial session from (6000/5000) to (5232/4360)

with

without URLTOKEN

further more, the default struct size for a session is 32, reducing this to 8

with urltoken, default struct size of 32

 

without urltoken, size 8

 

combining these approaches memory for default sessions goes from (6000/5000) to (4656/3880) thus saving 22% per session

That is still leaving an empty urltoken key is the session, and that’s not even considering removing the redundant CFTOKEN or SESSION_ID

Environment

None

Attachments

4

relates to

Activity

Show:

Michael Offner 6 January 2025 at 16:57

when storing the data to a session storage, Lucee already reduces that size as much as possible, dates are stored as long and cftoken and urltoken are not stored as all.
But having this reduction in memory mode of the session would mean to add extra logic to the session scope, what would make the session slower.
best solution would be to always use a session storage, then the session get stored after a minute idle, that could be a memory storage.

Details

Assignee

Reporter

Priority

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

Created 1 January 2025 at 11:01
Updated 6 January 2025 at 16:57