qbittorrent size #9996

Closed
opened 2026-02-21 20:30:12 -05:00 by deekerman · 7 comments
Owner

Originally created by @WalrusInAnus on GitHub (Mar 28, 2020).

Could anyone explain what the humongous pdb file that's part of the program is good for? Quick google search claims pdb files are for debugging, but, if true, why is this part of official release and not a beta or something?

Originally created by @WalrusInAnus on GitHub (Mar 28, 2020). Could anyone explain what the humongous pdb file that's part of the program is good for? Quick google search claims pdb files are for debugging, but, if true, why is this part of official release and not a beta or something?
Author
Owner

@R-Adrian commented on GitHub (Mar 28, 2020):

+1
i got into the habit of manually renaming that .pdb and then deleting it a few days later

a few years ago a similar issue was filed for it, and then closed because that file is "used when creating crash reports" https://github.com/qbittorrent/qBittorrent/issues/2635

it would be interesting to see the ratio between total crash reports, as recorded online by Microsoft, with their reliability monitor programme and the actual crash reports manually submitted to qBittorrent. imho that ratio is probably around 0.01% of the actual crashing users.

@R-Adrian commented on GitHub (Mar 28, 2020): +1 i got into the habit of manually renaming that .pdb and then deleting it a few days later a few years ago a similar issue was filed for it, and then closed because that file is "used when creating crash reports" https://github.com/qbittorrent/qBittorrent/issues/2635 it would be interesting to see the ratio between total crash reports, as recorded online by Microsoft, with their reliability monitor programme and the actual crash reports manually submitted to qBittorrent. imho that ratio is probably around 0.01% of the actual crashing users.
Author
Owner

@sledgehammer999 commented on GitHub (Mar 28, 2020):

@WalrusInAnus see https://github.com/qbittorrent/qBittorrent/issues/12247#issuecomment-603505766

Yesterday night, I discovered the actual reason randomly. The culprit is "msvc 2019". It produces bigger .pdb files for the same code. Up until now, the releases were compiled with msvc 2017. I plan to go back to it, but I am unsure if I can make in time for the next release (because the fixes are more important and should be done quickly)

@R-Adrian even so, see number of issues: https://github.com/qbittorrent/qBittorrent/labels/Crash

@sledgehammer999 commented on GitHub (Mar 28, 2020): @WalrusInAnus see https://github.com/qbittorrent/qBittorrent/issues/12247#issuecomment-603505766 Yesterday night, I discovered the actual reason randomly. The culprit is "msvc 2019". It produces bigger .pdb files for the same code. Up until now, the releases were compiled with msvc 2017. I plan to go back to it, but I am unsure if I can make in time for the next release (because the fixes are more important and should be done quickly) @R-Adrian even so, see number of issues: https://github.com/qbittorrent/qBittorrent/labels/Crash
Author
Owner

@xavier2k6 commented on GitHub (Mar 28, 2020):

@sledgehammer999 how about the use of /PDBCompress flag when compiling or perhaps making individual smaller pdb files for individual libraries/program?

@xavier2k6 commented on GitHub (Mar 28, 2020): @sledgehammer999 how about the use of `/PDBCompress` flag when compiling or perhaps making individual smaller `pdb` files for individual libraries/program?
Author
Owner

@Chocobo1 commented on GitHub (Mar 28, 2020):

Yesterday night, I discovered the actual reason randomly. The culprit is "msvc 2019". It produces bigger .pdb files for the same code.

That's weird, my pdb is ~62MB, compiled with msvc2019 with /O2 and without /LTCG.

@Chocobo1 commented on GitHub (Mar 28, 2020): >Yesterday night, I discovered the actual reason randomly. The culprit is "msvc 2019". It produces bigger .pdb files for the same code. That's weird, my pdb is ~62MB, compiled with msvc2019 with `/O2` and without `/LTCG`.
Author
Owner

@xavier2k6 commented on GitHub (Mar 28, 2020):

@Chocobo1 I believe @sledgehammer999 compiles with /01 Flag?!

Perhaps, we could test various compilation flags etc & see what results we yield...

@xavier2k6 commented on GitHub (Mar 28, 2020): @Chocobo1 I believe @sledgehammer999 compiles with `/01` Flag?! Perhaps, we could test various compilation flags etc & see what results we yield...
Author
Owner

@xavier2k6 commented on GitHub (Mar 28, 2020):

#1. The /OPT:REF and /OPT:ICF effect
Linker has a good view of all the modules that will be linked together, so linker is in a good position to optimize away unused global data and unreferenced functions. The linker however manipulates on a OBJ section level, so if the unreferenced data/functions are mixed with other data or functions in a section, linker won’t be able to extract it out and remove it. In order to equip the linker to remove unused global data and functions, we need to put each global data or function in a separate section, and we call these sections “COMDATs“. (The COMDAT construction is enabled by the /Gy and /Gw compiler flags). COMDATs and usage of these flags /OPT: REF and /OPT: ICF enable (here’s how to do this) linker optimizations. /OPT:REF eliminates functions and data that are never referenced and /OPT:ICF performs identical COMDAT folding. The two together form a strong force and the result is a smaller binary and hence also a smaller PDB.

Shrink my Program Database (PDB) file

/OPT: REF and /OPT: ICF are used when compiling according to the wiki instructions but yet some of the wiki instructions show /OPT:REF and /OPT:ICF=5 so perhaps a default number of iterations should be set for better results & the use of /O2 should be used more instead of /O1

@xavier2k6 commented on GitHub (Mar 28, 2020): >#1. The /OPT:REF and /OPT:ICF effect Linker has a good view of all the modules that will be linked together, so linker is in a good position to optimize away unused global data and unreferenced functions. The linker however manipulates on a OBJ section level, so if the unreferenced data/functions are mixed with other data or functions in a section, linker won’t be able to extract it out and remove it. In order to equip the linker to remove unused global data and functions, we need to put each global data or function in a separate section, and we call these sections “COMDATs“. (The COMDAT construction is enabled by the /Gy and /Gw compiler flags). COMDATs and usage of these flags /OPT: REF and /OPT: ICF enable (here’s how to do this) linker optimizations. /OPT:REF eliminates functions and data that are never referenced and /OPT:ICF performs identical COMDAT folding. The two together form a strong force and the result is a **smaller binary** and hence also a **smaller PDB**. [Shrink my Program Database (PDB) file](https://devblogs.microsoft.com/cppblog/shrink-my-program-database-pdb-file/) `/OPT: REF and /OPT: ICF` are used when compiling according to the wiki instructions but yet some of the wiki instructions show `/OPT:REF and /OPT:ICF=5` so perhaps a default number of iterations should be set for better results & the use of `/O2` should be used more instead of `/O1`
Author
Owner

@sledgehammer999 commented on GitHub (Mar 28, 2020):

That's weird, my pdb is ~62MB, compiled with msvc2019 with /O2 and without /LTCG.

I also include debug symbols from Qt and libtorrent.

@sledgehammer999 commented on GitHub (Mar 28, 2020): >That's weird, my pdb is ~62MB, compiled with msvc2019 with /O2 and without /LTCG. I also include debug symbols from Qt and libtorrent.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#9996
No description provided.