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

suggestion: caching NetworkMessage blocks #4450

Open
Zbizu opened this issue May 12, 2023 · 0 comments
Open

suggestion: caching NetworkMessage blocks #4450

Zbizu opened this issue May 12, 2023 · 0 comments
Labels
decisions Debatable/disputable enhancement Increase or improvement in quality, value, or extent

Comments

@Zbizu
Copy link
Contributor

Zbizu commented May 12, 2023

Explanation of what you want to do that is currently impossible

store part of NetworkMessage object as a variable (preferable in Lua considering that new features use it now)

Desired functionality

improve cache for packets by caching parts of NetworkMessage instead of rebuilding them in systems where returning cached binary data is sufficient (eg. exaltation forge, other server "meta" packets, golden outfit dialog or recently added highscores)

Available workarounds

strings with binary data, ugly looping to move bytes from string to networkMessage

Prior art

local stream = Stream()
stream:addByte(0xFF)

local networkMessage = NetworkMessage()
networkMessage:addBlock(stream)
@Zbizu Zbizu changed the title caching networkMessage blocks caching NetworkMessage blocks May 12, 2023
@Zbizu Zbizu changed the title caching NetworkMessage blocks suggestion: caching NetworkMessage blocks May 12, 2023
@EvilHero90 EvilHero90 added enhancement Increase or improvement in quality, value, or extent decisions Debatable/disputable labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
decisions Debatable/disputable enhancement Increase or improvement in quality, value, or extent
Projects
None yet
Development

No branches or pull requests

2 participants