-
Notifications
You must be signed in to change notification settings - Fork 3k
netsocket: dns: make dns-cache-size:0 remove whole DNS cache code #7239
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
netsocket: dns: make dns-cache-size:0 remove whole DNS cache code #7239
Conversation
This is modified also in: #7207 This pull request can be used in case application does not want to use the cache at all. That was not possible on previous lwip implementation (unless changing not exposed lwip internal configuration settings), but is good feature for new DNS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a SingletonPointer
would have prevented that. It does lazy construction, so if the object is not referenced, it's constructor would not be referenced either, allowing linker to drop it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need to be rebased on that other PR #7207, but seems fine to me.
I don't think |
Actually the original code does not even compile on IAR with ""nsapi.dns-cache-size": 0", so some kind of conditional compilation is needed:
|
Can you rebase? There is a conflict now |
@TeroJaasko Would you mind rebasing? |
Setting ""nsapi.dns-cache-size": 0" still left some of the DNS caching code in. Add crude #if to remove all of it. This allows one to save 429 bytes of flash and 48 bytes of RAM on ARMC5 builds.
2e89fa2
88d6dc7
to
2e89fa2
Compare
Rebased with current master and force pushed. |
/morph build |
Build : SUCCESSBuild number : 2487 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 2126 |
Test : SUCCESSBuild number : 2262 |
Description
Setting ""nsapi.dns-cache-size": 0" still left some of the DNS
caching code in. Add crude #if to remove all of it.
This allows one to save 429 bytes of flash and 48 bytes of RAM on
ARMC5 builds.
Pull request type