perf(injector): Optimize performance with fast parsers and direct syscalls#134
Open
HSSkyBoy wants to merge 3 commits intoJingMatrix:masterfrom
Open
perf(injector): Optimize performance with fast parsers and direct syscalls#134HSSkyBoy wants to merge 3 commits intoJingMatrix:masterfrom
HSSkyBoy wants to merge 3 commits intoJingMatrix:masterfrom
Conversation
We implement a connection check to bypass process flag retrieval and module execution for isolated processes when the zygisk daemon is unreachable.
…calls Replaced sscanf with a custom fast parser for device format and improved string prefix checking using string_view.
Replace ifstream with low-level I/O for spoof.prop. Use string_view for zero-copy line parsing. Fix logic errors and FD leaks in urandom hex generation. Early exit in map scanning once target library is found. Co-Authored-By: Max <109047395+maxsteeel@users.noreply.github.com>
Owner
|
I prefer to have as less code as possible, optimization is barely needed for most of cases. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Optimize the injector module by replacing sscanf with custom fast parsers for device format and integer parsing, using string_view for zero-copy prefix checks, and employing direct getdents64 syscalls for FD traversal to reduce overhead.Refactor prop loading with low-level I/O instead of ifstream, add early exit in map scanning, fix logic errors and FD leaks in urandom hex generation.
Co-Authored-By: Max 109047395+maxsteeel@users.noreply.github.com