If the body of an at statement contains any reference to a member variable of the enclosing class instance, then the instance ('this') is deep-copied with all members, whether or not they are needed.
For example, in the following code both tinyField and hugeField are copied, even though only tinyField is referenced:
On my workstation, the execution time for this code is 283ms. By adding
just before the at statement, the execution time is reduced to 0.112ms because hugeField is no longer copied.
While it is possible for the programmer to work around, adding val myField == this.myField; for every field that is required, it would be much neater if the compiler could insert this automatically.
It is a yet undecided language design issue. see XTENLANG-2466.