Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Properly scale WebSocketFrame's ByteList size to payload size. #2

Open
T99 opened this issue Apr 6, 2018 · 0 comments
Open

Properly scale WebSocketFrame's ByteList size to payload size. #2

T99 opened this issue Apr 6, 2018 · 0 comments
Assignees
Labels
efficiency Changes to increase efficiency.

Comments

@T99
Copy link
Owner

T99 commented Apr 6, 2018

As it stands, a given WebSocketFrame's ByteList often contains a larger length than is required for it's headers and payload, due to the fact that the ByteList automatically grows by its growthStepSize to accommodate added bytes, 10 more byte 'slots' may be tacked on even when we already know the final size of the frame, which may only require 3 of the 10 new 'slots'.

@T99 T99 added the efficiency Changes to increase efficiency. label Apr 6, 2018
@T99 T99 self-assigned this Apr 6, 2018
@T99 T99 added this to Future in Roadmap to 0.1.0 Pre-Release via automation Apr 6, 2018
@T99 T99 added this to the 0.1 Pre-Release milestone Apr 6, 2018
T99 added a commit that referenced this issue Apr 9, 2018
   - Functionality Changes
      - `ByteList.java`
         - Added `resizeToLength()` method to eventually address issue #2.
         - Modified `getDebugInfo()` to used `System.lineSeparator()`.
      - `WebSocket.java`
         - Added an inner enum, `State` and related changes.
         - Modified `generateName()` to use a `StringBuilder`.
      - `WebSocketFrame.java`
         - Added an inner enum, `Type` and related changes.
      - `WebSocketControlFrameType.java`
         - Removed.
      - `WebSocketDataFrameType.java`
         - Removed.
      - `WebSocketFrameType.java`
         - Removed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
efficiency Changes to increase efficiency.
Projects
Development

No branches or pull requests

1 participant