Skip to content

single_files_libs/combine.sh very slow, ~3 minutes. #2924

Description

@averms

Describe the bug
The amalgamation script is very slow, running it through Bash takes around 3 minutes for zstd-in.c.

To Reproduce
Steps to reproduce the behavior:

  1. cd build/single_file_libs && time create_single_file_library.sh

Expected behavior
Faster amalgamation.

Solution

I wrote an alternative in Python. It is 135x faster so it takes around 1 second. If you don't want to take an (optional) build dependency on Python, perhaps the shell script could be refactored somehow. There is a comment in the source suggesting that speed was sacrificed for POSIX compliance but the script isn't compliant with POSIX because it uses local.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions