Skip to content

Slow because data is fetched one byte at a time #11

@tarui

Description

@tarui

The following section, reading data one byte at a time, is very slow when trying to handle MB-order packets.

unless recv_data = @socket.getc
sleep 1
next
end

Simply replace with the following to speed up the process. I didn't make a pull request because I wasn't sure what to specify as a buffer size, but I hope you will consider replacing it.

recv_data = @socket.readpartial(4096*16)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions