Skip to content

Comments

Library: reduced amount of XMLElement::Attribute() calls in loadFunction()#8233

Open
firewave wants to merge 1 commit intodanmar:mainfrom
firewave:loadlib-attr
Open

Library: reduced amount of XMLElement::Attribute() calls in loadFunction()#8233
firewave wants to merge 1 commit intodanmar:mainfrom
firewave:loadlib-attr

Conversation

@firewave
Copy link
Collaborator

No description provided.

@firewave
Copy link
Collaborator Author

firewave commented Feb 18, 2026

Ir in the parent process:

std only - 39,329,027 -> 38,504,843
--library=posix,gnu - 56,066,190 -> 54,469,226
--library=qt - 51,981,301 -> 50,493,731

This should mainly help with testrunner.

@firewave firewave changed the title Library: reduced amount of XMLElement::Attribute() calls in loadFunction() [skip ci] Library: reduced amount of XMLElement::Attribute() calls in loadFunction() Feb 18, 2026
@firewave firewave marked this pull request as ready for review February 18, 2026 12:14
@sonarqubecloud
Copy link

@firewave
Copy link
Collaborator Author

callgrind in CI:
54,609,899,412 -> 54,605,179,404

} else if (functionnodename == "returnValue") {
if (const char *expr = functionnode->GetText())
mData->mReturnValue[name] = expr;
if (const char *type = functionnode->Attribute("type"))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this original code is more natural and readable imho than the new code. The Ir benefit is small. Do you measure a full analysis of a project or just analysis of some file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case I measured the start-up only. Like I said it will mainly help the tests where we load a lot of libraries. It's a 2% gain and more is possible.

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