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

Reduce MRM.dll binary size by 37 KB by disabling RTTI. #904

Merged
merged 2 commits into from
Jun 2, 2021

Conversation

jefgen
Copy link
Member

@jefgen jefgen commented Jun 2, 2021

MRT Core doesn't use RTTI, but the *.vcxproj files that are used to build MRM.dll have this enabled (it is implicitly set by default).

This change disables RTTI for MRM.dll which reduces the overall binary file size (for x64 Release) by 37 KB.

File Size Before Size After
MRM.dll 348,672 310,784

Delta = 37,888 bytes (37 KB)

SizeBench delta for MRM.dll

Name Size on disk Diff Size in memory Diff Size in memory (including section padding) Diff
_RDATA 0 0 0
.rsrc 0 0 0
.pdata -1024 -624 0
.reloc -1024 -624 0
.text -5632 -5424 -4096
.data -10240 -10080 -12288
.rdata -19968 -19888 -20480

This change also cleans up some of the duplicated/redundant vcxproj values as well.

@ghost ghost added the needs-triage label Jun 2, 2021
@jefgen
Copy link
Member Author

jefgen commented Jun 2, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jefgen jefgen merged commit b26e6d1 into main Jun 2, 2021
@jefgen jefgen deleted the user/jefgen/mrtcore-rtti branch June 2, 2021 22:09
DrusTheAxe pushed a commit that referenced this pull request Jun 14, 2021
* MRTCore: Reduce DLL size by disabling RTTI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants