You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additional context
This is a minimal repro of what happens in ELP's parse server.
The input file provided in the archive was obtained by running the parse server on OTP's unicode_util and dumping the resulting term.
The text was updated successfully, but these errors were encountered:
I haven't checked, but I assume this is because with the new stdio implementation in 26 we keep all internal data as unicode. So the data is first converted from latin1 to unicode to then be converted back again before outputted to stdout. Prior to OTP 26 the stdio used when redirecting to a non-terminal was not unicode aware, so it would just shuffle the bytes.
If my hypothesis is correct , the solution would be to make group aware that user_drv is currently in latin1 mode and then skip the convertion. A PR would be very welcome!
Describe the bug
file:write/2
toerlang:group_leader()
withlatin1
encoding is unexpectedly slow on OTP 26.2.3. It is fine on OTP 26.0.2.To Reproduce
Run the following script on OTP 26.2.3 with the input file (3MB) provided in this archive (redirect output to
/dev/null
).time escript test.erl >> /dev/null
takes ~1.6s. Commenting out thefile:write
or removinglatin1
encoding reduces runtime to ~0.3s.Expected behavior
file:write
should be near-instantaneous there.Affected versions
OTP 26.2.3
OTP 26.1.2
Doesn't happen on OTP 26.0.2
Additional context
This is a minimal repro of what happens in ELP's parse server.
The input file provided in the archive was obtained by running the parse server on OTP's
unicode_util
and dumping the resulting term.The text was updated successfully, but these errors were encountered: