Skip to content

Trim down or minimize memory usage #18

@Jacalz

Description

@Jacalz

We have noticed, partly based on the comment here, that the following map is massive:

var glyphAliases = map[string]string{ // 2462 entries

A map of, according to the comment, 2462 different strings result in a lot of memory usage and quite a huge piece of binary size increases. Can this map be reduced in any way, only created when actually needed or something like that? It might make sense to convert it into one large switch-case (especially now that Go 1.19 uses jump tables for large int and string switch cases) as the Go compiler more easily can optimize that but it would have to be tested to make sure that it isn't noticeably slower.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions