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

CxxPreprocessor: reduce run-time overhead, extract invariants #1637

Merged
merged 1 commit into from
Dec 27, 2018

Conversation

ivangalkin
Copy link
Contributor

@ivangalkin ivangalkin commented Dec 21, 2018

There were several actions, which were executed for each preprocessed source file
Among others all standard macros were re-created for each preprocessor invocation.
Create those macros statically in order to reduce the run-time overhead.


This change is Reviewable

There were several actions, which were executed for each preprocessed source file
Among others all standard macros were re-created for each preprocessor invocation.
Create those macros statically in order to reduce the run-time overhead.
@ivangalkin ivangalkin added this to the 1.2.1 milestone Dec 21, 2018
@ivangalkin ivangalkin self-assigned this Dec 21, 2018
@ivangalkin ivangalkin requested review from Bertk and guwirth December 21, 2018 00:17
@guwirth
Copy link
Collaborator

guwirth commented Dec 21, 2018

@ivangalkin not sure if I wanna have it in 1.2.1. Is there a measurable difference in the performance?

@ivangalkin
Copy link
Contributor Author

@guwirth I haven't measured it (yet). It won't provide any huge boost, but is a right thing to do imho - to make invariants to the constants

@guwirth
Copy link
Collaborator

guwirth commented Dec 21, 2018

@ivangalkin I like to merge it. I'm only not sure if we should do it in 1.2.1. Therefore the question for the risk.

@ivangalkin
Copy link
Contributor Author

@guwirth this change doesn't introduce any risk; this is refactoring only.

I am investigating memory consumption problem. I am sure, that CxxPreprocessor uselessly collects data. I'll provide one more PR soon. That one will be more invasive.

@guwirth guwirth modified the milestones: 1.2.1, 1.2.2 Dec 21, 2018
@guwirth guwirth merged commit c7af36e into SonarOpenCommunity:master Dec 27, 2018
@guwirth guwirth mentioned this pull request Feb 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants