-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Fix comment parsing speed regression #2701
Conversation
af14ab1
to
b1faf80
Compare
b1faf80
to
e032615
Compare
79a013f
to
bfd64b0
Compare
bfd64b0
to
f16a412
Compare
f16a412
to
806853d
Compare
7f0fcff
to
b93491d
Compare
b93491d
to
d15f717
Compare
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Bump |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
d15f717
to
f54bd85
Compare
ee6c6e0
to
009adc0
Compare
009adc0
to
7f3189c
Compare
7f3189c
to
7629777
Compare
This PR has been automatically marked as stale because it has had no activity for the last 60 days. It will be closed in 7 days if no further activity occurs. Thank you for your contribution. |
Requirements
BTT or MKS TFT
Description
PR #2671 promised to "Optimize comment parsing in comment.c", instead it crowded the MCU with unnecessary instructions, all these during printing, where speed is crucial. The opposite of optimize was done, there is no benefit from it, only loss. The resulting code is not even smaller with one single byte.
Because of PR #2671 the first word in every comment from the G-code file is preprocessed even if it is not even a candidate for a known keyword. This takes time and it is unnecessary, not to mention again that this is during printing.
This PR brings back the systematic approach that was done before this "optimization" and also does what PR #2671 assumably wanted to do, reduces the footprint of "comment.c" on the FW's size.
An alternative for `strlwr()' and 'strupr()' is introduced. The introduced functions are lighter and are returning the pointer to the processed string.
Benefits
Related Issues