Skip to content

ujson uses 30% memory compared to json, even after load complete #333

@hyperknot

Description

@hyperknot

In an extremely simple test of loading a 140 MB JSON file, ujson ends up with 30% higher memory usage even after loading has happened.

Both built-in json and simplejson uses exactly the same amount of memory: 992 MB
ujson on the other hand uses: 1314 MB

Test is super simple, like:

import json
import ujson
import time

with open('test.json') as infile:
    data = ujson.load(infile)

time.sleep(60)

And I check in htop's RES column for the memory usage. It's the same as macOS's Activity Monitor's memory column.

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