Skip to content

Why are Servo builds 31MB MacOS, 84MB Linux, 102MB Windows? #14176

Closed

Description

@leeoniya

Is the large discrepancy due to polyfilling missing or unshimmed platform features via wholesale re-implementations & crate dependencies?

Are Linux and Windows builds ever expected to approach the size of MacOS (presumably the first-class platform)?

Would build size parity be a good meta-bug for any needed shimming work?

thanks!

Activity

  1. added
    I-perf-bloat
    on Nov 11, 2016
  2. metajack commented on Nov 11, 2016

    @metajack
    Collaborator

    Linux and macOS ship with a large number of libraries that we depend on. On Windows, we have to ship those libraries with Servo. One example of this is OpenSSL.

    We should try and get this down if we can. Certainly things like replacing freetype with DirectWrite will help. OpenSSL can possibly be replaced with SecureChannel, etc.

    It would probably be worthwhile to have a metabug if someone was going to go through the libs we need and figure out what needs to be done.

  3. leeoniya commented on Nov 11, 2016

    @leeoniya
    Author

    A windows OpenSSL binary is a couple megs; probably not worth the effort. Freetype binaries for Windows are ~1MB [1].

    That leaves 67MB of "something". It'd be good to see a breakdown of which dependency rabbit holes are heaviest to prioritize efforts.

    [1] https://github.com/ubawurinna/freetype-windows-binaries/tree/master/x64

  4. metajack commented on Nov 11, 2016

    @metajack
    Collaborator

    A few things you can do to start the investigation:

    1. Compare rlib sizes for the dependencies. Mostly we statically link everything. If rlibs are bigger on Windows than on other platforms, then maybe this points us to a compiler issue.
    2. Compare all the DLLs we include with the Servo binary.
    3. Check whether the -msvc target produces similarly sized executables. Perhaps this is just the static linking of all the MSYS2 crap into the binary.
  5. leeoniya commented on Nov 11, 2016

    @leeoniya
    Author

    @metajack thanks for the pointers

  6. lygstate commented on Nov 14, 2016

    @lygstate
    Sponsor

    The MSVC version are 40MB.

  7. metajack commented on Nov 14, 2016

    @metajack
    Collaborator

    So this looks like mingw bloat, which will be going away. That puts linux as the long pole now :)

  8. leeoniya commented on Nov 14, 2016

    @leeoniya
    Author

    are there any working MSVC builds/nightlies to try out or is everything still blocked on #12125?

  9. metajack commented on Nov 15, 2016

    @metajack
    Collaborator

    I believe we have fonts working now, so in theory we should switch over to -msvc nightlies I think. @larsbergstrom is there anything blocking us?

  10. lygstate commented on Nov 15, 2016

    @lygstate
    Sponsor

    msvc build are running and show things

  11. larsbergstrom commented on Nov 15, 2016

    @larsbergstrom
    Contributor

    @metajack the only thing blocking us is having buildbot support. I've been focused on Android and have let servo/saltfs#491 rot, unfortunately, but will get back on it once Android is online. Android's a priority because people keep breaking it (it just broke again), so the race of fixing all the submodules and getting buildbot enabled before somebody breaks it again is pretty brutal.

    Windows has appveyor on both platforms, and people care more about it :-)

  12. leeoniya commented on Jan 8, 2017

    @leeoniya
    Author

    @larsbergstrom any further progress on this now that servo/saltfs#491 is merged?

  13. larsbergstrom commented on Jan 12, 2017

    @larsbergstrom
    Contributor

    @leeoniya No progress, but at this point we should be able to minimize the set of files that are included in the MSVC MSI. Right now, we drag in all the same binaries on both, even though the MSVC version clearly doesn't need all those GNU bits :-)

  14. potocpav commented on Jan 26, 2017

    @potocpav
    Contributor

    On x86_64 archlinux, I got 226MB for release, 544MB debug. Trying to investigate.

  15. potocpav commented on Jan 26, 2017

    @potocpav
    Contributor

    Using https://github.com/google/bloaty on linux:

         VM SIZE                          FILE SIZE
     --------------                    --------------
       0.0%       0 .debug_info         93.5Mi  41.4%
       0.0%       0 .debug_loc          37.7Mi  16.7%
      56.3%  30.7Mi .text               30.7Mi  13.6%
       0.0%       0 .debug_str          12.7Mi   5.6%
       0.0%       0 .debug_ranges       11.6Mi   5.1%
      18.3%  9.96Mi .data               9.96Mi   4.4%
       0.0%       0 .strtab             5.82Mi   2.6%
       0.0%       0 .debug_line         4.93Mi   2.2%
       0.0%       0 .symtab             3.63Mi   1.6%
       5.5%  2.98Mi .rodata             2.98Mi   1.3%
       5.3%  2.89Mi .rela.dyn           2.89Mi   1.3%
       5.2%  2.81Mi .eh_frame           2.81Mi   1.2%
       4.3%  2.35Mi .gcc_except_table   2.35Mi   1.0%
       3.1%  1.71Mi .data.rel.ro        1.71Mi   0.8%
       0.0%       0 .debug_abbrev       1.02Mi   0.5%
       0.9%   479Ki .eh_frame_hdr        479Ki   0.2%
       0.7%   387Ki .data.rel.ro.local   387Ki   0.2%
       0.2%   111Ki [Other]              365Ki   0.2%
       0.0%       0 .debug_aranges       241Ki   0.1%
       0.2%   139Ki .bss                     0   0.0%
       0.0%      15 [None]                   0   0.0%
     100.0%  54.5Mi TOTAL                225Mi 100.0%
    

    Without the debug symbols, the size goes down to 54MiB. Can't compare with Mac/Win since I don't have it :(

  16. atouchet commented on Jun 22, 2017

    @atouchet
    Contributor

    Looking at the current numbers the Windows build is now down to 27 MB. The Linux build has increased slightly to 85 MB however.

  17. nox commented on Oct 7, 2017

    @nox
    Contributor

    Is there anything to do in this issue? Should it be repurposed in an issue that says we should decrease the binary size in general?

    Cc @metajack

  18. paulrouget commented on Oct 7, 2017

    @paulrouget
    Contributor

    Related: #18625

  19. mrobinson commented on May 1, 2024

    @mrobinson
    Member

    New numbers 133 MB on MacOS, 155 MB on Linux, and 133 MB on Windows.

  20. mrobinson commented on Sep 24, 2026

    @mrobinson
    Member

    Servo is about 100MB on all platforms these days. I think we can close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-perf-bloat

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions