(lucee scope).keyExists( someKey ) performs very differently from StructKeyExists( (lucee scope), someKey )

Description

I have been spending time optimizing the memory usage of our application and found that something like request.keyExists( someKey ) is not only slower than StructKeyExists( request, someKey ), but it also uses considerably more memory in my testing using FusionReactor.

Is there anything fundamental here that can't be changed/helped? I'm presuming this applies to other BIFs vs object methods also.

Worth noting, that if we do something regularCfmlStruct.keyExists( someKey ), the memory usage is much less than when performing it on a CFML scope, but still more than StructKeyExists().

Environment

None

Assignee

Unassigned

Reporter

Dominic Watson

Priority

Critical

Labels

None

Fix versions

None

Sprint

None
Configure