Skip to content

json::serialize takes an extraordinary amount of time on clang / libc++ #697

@madmongo1

Description

@madmongo1

PLEASE DON'T FORGET TO "STAR" THIS REPOSITORY :)

When reporting a bug please include the following:

Version of Boost

1.79

Steps necessary to reproduce the problem

Compile the linked program https://github.com/madmongo1/json-bug-1

with:
clang 13
-stdlib=libc++

All relevant compiler information

clang 13
-stdlib=libc++

Run the executable in the same directory as the bundled log file demo.log.

The program reads one line of text from the file, parses it to json and then serialises the json value back to a string.

With GCC, the serialisation is instantaneous.

With clang (in both debug and release configurations), the parsing is instantaneous, but the serialisation takes many minutes.

It does make progress, but incredibly slowly. I have waited 5-10 minutes. In that time, the program was only able serialise approx 140k of text.

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