Skip to content

Replace PyAccu with PyUnicodeWriter #95005

Closed
@aivarsk

Description

@aivarsk

PyAccu is used only in two places:

  • JSON encoder (PyUnicodeWriter is used already for the decoder)
  • StringIO (very minimal use of PyAccu)

The newer PyUnicodeWriter seems to be a better tool for aggregating strings and removing PyAccu gets rid of >100 lines of C code while keeping the same functionality.

P.S. The new JSON encoder also performed ~10% better on a completely synthetic test encoding a 20Mb JSON. That JSON in turn was created while investigating the lack of concurrent execution in FastAPI services. Which turned out to be due to JSON encoding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions