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
Use a cached EOFException rather than constructing new.
Exception creation (or more correctly, stack trace generation) is
not cheap on the JVM. By creating a new EOFException for every
read EOF, we introduce a lot of overhead into processes that open
many small files and read them to completion. The EOFExceptions we
raise are also immediately caught and turned into appropriate
Ruby errors or return values. In order to reduce the cost of EOF
reads, I've introduced a single cached EOFException we throw for
all EOF events. Commenting out its initialization in
ChannelStream will return the original behavior, if necessary for
debugging.
0 commit comments