Skip to content

Speed up JSON-AD Serialization #175

Open
@joepio

Description

@joepio

Apparently, in some local tests the server responds faster to JSON-LD or TTL requests (4ms average in dev mode) then JSON-AD (6ms). This is weird, since the JSON-LD and TTL versions fetch all the individual properties, which means they should be far slower than JSON-AD. Something weird is going on, probably inside propvals_to_json_ad_map.

But still... The median response with normal concurrency is 1ms on my laptop, so performance wise, this is not a priority at the moment.

EDIT: Serializing a JSON-AD resource can take up to 1ms for collections. That's way too slow!

I've added a benchmark, and it had serialisation times of 70us for /collections in JSON-AD, 100us for JSON-LD and JSON, and 140 for Turtle. I expected this order, but would still expect JSON-AD to be way faster, since the others need to fetch Properties for every Key, whereas JSON-AD does not have that dependency. JSON-LD serialisation does not even use Store! So I don't get why it's relatively slow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions