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

refactor GetMessageID to enhance the performance #268

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

VladoLavor
Copy link
Collaborator

Besides generating the message ID, the method GetMessageID updates the Path/MessageID/MessageType mapping for every API call (to make it known to the request handler).

This seems inefficient and redundant, as every message is already registered in advance in the generated init() in its API file.

The patch uses these pre-registered messages to fill the msgMapByPath map during the connection procedure, so it does not have to be done again, and GetMessageID can do only what it says.

The msgID map seems to be unused.

Signed-off-by: Vlado Lavor [email protected]

@VladoLavor VladoLavor self-assigned this Feb 20, 2025
@VladoLavor VladoLavor requested review from ondrej-fabry and a team February 20, 2025 11:00
@ondrej-fabry
Copy link
Member

Good find.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants