Skip to content

Use the app container's icudt.dat file in app extensions #17877

Closed

Description

@rolfbjarne

The icudt.dat file is copied to all app extensions as well as the app container.

This is rather useless, we only need one copy, and we can use the one in the app container.

This should save ~1.9mb per app extension.

Activity

  1. added
    enhancement
    on Mar 22, 2023
  2. added this to the .NET 8 milestone on Mar 22, 2023
  3. rolfbjarne commented on Mar 22, 2023

    @rolfbjarne
    MemberAuthor

    @akoeplinger were you looking at hardcoding the path to the icudt.dt file for NativeAOT? Once we fix this issue, the icudt.dt file might not be inside the app bundle anymore for app extensions (we'll still know the path to the icudt.dat file, relative to the root of the app bundle, at build time).

  4. akoeplinger commented on Mar 22, 2023

    @akoeplinger
    Member

    Right now we use this fallback path if the ICU_DAT_FILE_PATH AppContext key isn't set:

    https://github.com/dotnet/runtime/blob/e56db76481726cc451b8fcf499500f9f3218de63/src/native/libs/System.Globalization.Native/pal_locale.m#L32

    I think we could easily modify this to always pass in a path via that key and just assume it is relative to the bundle root.

  5. akoeplinger commented on Jun 22, 2023

    @akoeplinger
    Member

    The runtime change to support a relative ICU_DAT_FILE_PATH was merged and will show up in 8.0-preview6

  6. modified the milestones: .NET 8, .NET 9 on Sep 11, 2023
  7. akoeplinger commented on Jul 22, 2024

    @akoeplinger
    Member

    .NET 9 uses "hybrid globalization" which doesn't rely on bundling ICU with the app anymore so this should no longer be needed going forward.

  8. moved this to Optimizations in .NET 9on Aug 27, 2024
  9. rolfbjarne commented on Sep 26, 2024

    @rolfbjarne
    MemberAuthor

    Closing as per last comment.

  10. moved this from Optimizations to Done in .NET 9on Sep 26, 2024
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

    app-sizeenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions