Skip to content

optimized pipe writing/reading and ErrorMessage serialization a bit#5279

Merged
firewave merged 4 commits intocppcheck-opensource:mainfrom
firewave:pipe
Aug 13, 2023
Merged

optimized pipe writing/reading and ErrorMessage serialization a bit#5279
firewave merged 4 commits intocppcheck-opensource:mainfrom
firewave:pipe

Conversation

@firewave
Copy link
Copy Markdown
Collaborator

@firewave firewave commented Jul 30, 2023

With -D__GNUC__ --debug-warnings --template=daca2 --check-library -j2 ../test/testsymboldatabase.cpp this reduces the IR needed for serializing/writing to a third (down from ~17,000). On the reading side there is not much of an improvement. But this will help a lot with daca as we are generating and processing millions of errors.

@danmar
Copy link
Copy Markdown
Collaborator

danmar commented Aug 7, 2023

If behaviour is unchanged.. looks good to me.

@firewave
Copy link
Copy Markdown
Collaborator Author

firewave commented Aug 7, 2023

If behaviour is unchanged.. looks good to me.

It should.

It is still a draft since I still want to add unit tests for those "invalid" characters in the XML.

@firewave firewave marked this pull request as ready for review August 8, 2023 15:30
@firewave firewave marked this pull request as draft August 8, 2023 15:48
@firewave
Copy link
Copy Markdown
Collaborator Author

firewave commented Aug 8, 2023

The calls were added in e6f042d for a deserialization failure with a 0 byte. Will look into it.

@firewave
Copy link
Copy Markdown
Collaborator Author

I removed the part which "fixes" the XML as it breaks an existing test and appears to be necessary. Will tackle that in a different PR.

@firewave firewave marked this pull request as ready for review August 11, 2023 12:37
@firewave firewave merged commit 5371455 into cppcheck-opensource:main Aug 13, 2023
@firewave firewave deleted the pipe branch August 13, 2023 09:52
chrchr-github pushed a commit that referenced this pull request Aug 21, 2023
…writing - fixes stray `\0` characters in output (#5354)

This was introduced in #5279. We were transferring the terminating `\0`
via the pipe and also added another one in the parsing. As we are now
directly writing into a `std::string` these extra characters will now
show up in it. So just get rid of them.
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