It's definitely worth considering.

DAFFODIL-2852 showed that variable copies can definitely have lot of overhead. Though the commit to resolve that issue reduced it pretty substantially, and I believe that change made variable copies disappear from profiling (but I'm not positive).

In my most recently profiling, PState copies didn't show up. Most of the time is spent just making Strings or DINode. But it's possible the format I tested just doesn't have enough PoUs to matter, or maybe it's spread out enough that it disappears into the noise.

On 2024-01-09 01:39 PM, Mike Beckerle wrote:
Right now we copy the state of the parser as every point of uncertainty is
reached.

I am speculating that we could copy on demand. So, for example, if no
variable modifying operation occurs then there would be no overhead  to
copy the variable state.

This comes at the cost of each variable doing an additional test of whether
the variable state needs to be copied first.

Thoughts?


Reply via email to