On Tue, 18 Oct 2022 16:03:39 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

> I'd respectfully disagree: in a large application, there might be hundreds (a 
> thousand?) Nodes, and only a handful (10-20?) Nodes with this property (2%), 
> so it's a waste of RAM. One may think it's only 8Kb on a 64 bit machine, but 
> it does add up quickly. Even the access pattern is basically 'get it once to 
> establish the fluent pipeline', with no more calls to the Node accessor 
> (unlike MiscProperties constituents, some of which get accessed rather 
> frequently).

I understand your point, but I don't think that this is sufficient reason to 
introduce a new way of storing property instances in an ad-hoc manner. If 
memory consumption is a concern, I would rather analyze the issue in a separate 
enhancement proposal, think it through in terms of API, and then transition all 
relevant property instances to the new storage mechanism. Part of that proposal 
should also be an evaluation of the trade-offs between memory consumption and 
performance in terms of cache locality and lookup speed.

-------------

PR: https://git.openjdk.org/jfx/pull/830

Reply via email to