Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change vector with linkedlist #24

Open
alekay2200 opened this issue Mar 18, 2024 · 0 comments
Open

Change vector with linkedlist #24

alekay2200 opened this issue Mar 18, 2024 · 0 comments
Assignees
Labels
Sync Client Implementation the syncronous version of the websocket client
Milestone

Comments

@alekay2200
Copy link
Collaborator

Change vector with linkedlist.

Sync client use vectors to keeps the in/out events. Vectors does not free the memory when the items are move out the queue. If you execute the method send to may times before calling the internal loop, the internal queue will occupy a lot of memory no matter if is empty. For example if you try to send 10k messages and each output event occupy 20 bytes, the queue will use 10k * 20 bytes of memory.

LinkedList solve this problem because every time you push or pop data a the linkedlist will allocate or deallocate memory.

@alekay2200 alekay2200 added the Sync Client Implementation the syncronous version of the websocket client label Mar 18, 2024
@alekay2200 alekay2200 added this to the Syn Client milestone Mar 18, 2024
@alekay2200 alekay2200 self-assigned this Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sync Client Implementation the syncronous version of the websocket client
Projects
None yet
Development

No branches or pull requests

1 participant