No, all the string and stream parameters should be const
You did a few, but not all and it does make a difference.
This remark goes for ALL the code you presented in several threads: some AI is not very good at applying the const parameter optimization for managed types.
Then again, they are not always aware which string types they are using.. They often miss {$H+/-} and {$mode delphi/unicode} and more...
Which model(s) are you using?
Even claude.ai makes that mistake unless you make it explicitly aware it has to take managed types into account. From the models I use, Only DeepSeek will usually optimize correctly with const.