Skip to content

msgfmt: Generate GNU hash table #131725

Open

Description

@StanFromIreland

Feature or enhancement

Proposal:

Assigning self, I am working on this.

I was working on #79809 however I thought it would be best to first to have Python generate the hash table and then to decode it :-)

PR soon, just have to figure out how to test it!

For GNU gettext the mo files generated by my modifications result in a 27% speed up.

cc @tomasr8

Linked PRs

Activity

  1. StanFromIreland commented on Mar 26, 2025

    @StanFromIreland
    MemberAuthor

    This can be put in the gettext project since there have been other msgfmt issues there.

  2. added
    triagedThe issue has been accepted as valid by a triager.
    on Mar 28, 2025
  3. serhiy-storchaka commented on Jul 23, 2025

    @serhiy-storchaka
    Member

    I am not sure how this can be useful for us. The gettext module does not use the hash table. Anyway, it is easier and faster to read the whole file in memory in Python.

    This doesn't mean rejection. It just has a low priority feature.

    And how to test it? It would help if the gettext module supported lazy loading. It should be optional, because reading the whole file in memory is more efficient and safer.

  4. StanFromIreland commented on Jul 23, 2025

    @StanFromIreland
    MemberAuthor

    The gettext module does not use the hash table.

    See #79809

    I thought it would be better to first support it in msgfmt and then in gettext? Do you think it should be the other way around?

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

Metadata

Metadata

Labels

triagedThe issue has been accepted as valid by a triager.type-featureA feature request or enhancement

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions