Notepad2e
Notepad2e copied to clipboard
Optimize for size
This improves issue #183. However, I suppose you/we want to discuss comit 30ddf5c as this introduces a new dependency to the VS2017 C++ Runtime Libraries (which are not present on all Windows systems by default, IIRC).
This MR is supposed to be on top of #184.
Personally I would choose speed over size. I believe most other users too. I don't think optimizing for speed over size alone is what is making our builds so much larger (#183).
Default configuration should be optimizing for speed.
Is it normal that GitHub shows diff in this PR with already merged master as if it wasn't merged? Supposedly it should only show new changes in this PR compared to new HEAD.
- Optimization for size allow to decrease binary size for ~300KiB. You've already decided not to use this option by default.
- Switching to "Multi-threaded DLL" runtime library (/MD option) allow to decrease binary size for ~200 KiB but caused a dependency from the external runtime DLLs. Unfortunately, this option heavily defeats the portability of the Notepad2e builds and does not allow to start application on clean OSes (even on Windows 10), error prompt will popup:

- Summary: total available size decrease is ~500KiB.
| Size, KiB | /MT | /MT + optimization | /MD | /MD + optimization |
|---|---|---|---|---|
| Release x86 | 2017 | 1821 | 1705 | 1503 |
| Release x64 | 2420 | 2145 | 2188 | 1915 |
- At this point diff for this PR vs master branch is shown correctly.
Please clarify: what is supposed to be done with the changes from this PR?
@csware What are we supposed to do with this PR?
Yesterday I build the vanilla Notepad2 sources (with VS2017) and got a binary of ~800kib, building bf22e43296723fae63e6651508800cb81b676abc alrteady resulted in ~1,2mib (x86).
Yesterday I build the vanilla Notepad2 sources (with VS2017) and got a binary of ~800kib, building bf22e43 alrteady resulted in ~1,2mib (x86).
Could you figure why? Maybe because of the updated Scintilla? Or VC runtime version?
Personally I don't mind the extra 1.5 MiB of size Notepad 2e brings. It's almost completely irrelevant in today's world, it's not like we're talking about 10s or 100s of megabytes gained.
If there's an easy way to shed off some size without sacrificing functionality (Boost, etc.) or speed, then it's fine, but if not, I would not stress too much over it.
building bf22e43 alrteady resulted in ~1,2mib (x86).
I wonder if it's a coincidence that XhmikosR's mod (https://github.com/XhmikosR/notepad2-mod/) is about the same size, 1.38 MB.