forked from opentibiabr/canary
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: EventCallback optimization (opentibiabr#3004)
This PR refactors how event callbacks are stored and retrieved. Specifically, the internal structure for managing callbacks was changed from `std::vector` to a more efficient `phmap::flat_hash_map`. This change avoids the need to recreate a vector every time event callbacks are accessed, improving performance and reducing memory overhead. Additionally, the following issues were addressed: Duplicate log messages: A duplicate log was being created in luaEventCallbackCreate. This has been removed, as the message was already sent earlier in the process. --------- Co-authored-by: Renato Machado <[email protected]>
- Loading branch information
Showing
5 changed files
with
67 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters