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

improve the "ASCReader" read performance. #1709

Closed
wants to merge 5 commits into from
Closed

Conversation

XXIN0
Copy link
Contributor

@XXIN0 XXIN0 commented Dec 22, 2023

Improve the ASCReader read performance.
Use re.compile to compile the regular expression,then match the message will faster than direct match the message .

The read speed is about 30% faster than before.

improve the "ASCReader" performance.
Fix: the test  error "error: Item "None" of "Optional[Match[str]]" has no attribute "group"  [union-attr]"
style: format code with "Black Code Formatter"
can/io/asc.py Outdated Show resolved Hide resolved
can/io/asc.py Outdated Show resolved Hide resolved
@XXIN0 XXIN0 marked this pull request as draft December 30, 2023 03:00
* improvement: make regular expression compile result as module constants.

---------

Co-authored-by: XXIN <[email protected]>
@XXIN0 XXIN0 marked this pull request as ready for review December 30, 2023 06:11
@XXIN0
Copy link
Contributor Author

XXIN0 commented Dec 30, 2023

this pull request is a little confusing, so I close it and make a new pull request.

@XXIN0 XXIN0 closed this Dec 30, 2023
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