Skip to content

--merge should memoize the results for performance #161

@movermeyer

Description

@movermeyer

--merge currently takes a long time, needlessly.

Instead of iterating over each locale in turn and merging in the ancestor locales each time:

en-CA -> en -> root
en-GB -> en -> root
en-US -> en -> root

All of these use the en -> root, which is the same data, so there is no need to recompute those for each child locale.

Instead, you could iterate over the graph of locales breadth-first starting at the root locale, then cache the results for use in the other locales.

(Of course, this might not be worth doing as the whole concept of --merge is likely to change. I just wanted to capture this potential optimization here)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions