1/2I'm working on my #rdf-pub UI of the RdfPubClient library.Today I had a look at the performance when reading the inbox.
-
1/2
I'm working on my #rdfpub UI and the RdfPubClient library.
Today I had a look at the performance when reading the inbox. It was dirty code.
Reading ~20 activities took > 1 second.
I was able to reduce this to about 500ms.It turned out that parsing the json-ld string into my rdf4j-model (or my ActivityPubObject objects) took a very long time.
It was strange that when I only read 3 activities, it took almost the same amount of time.
-
2/2
Then I changed the reading of the activities from JSON-LD to TURTLE. Thus also the parsing to TURTLE -> ActivityPubObject objects, no JSON-LD any more.Duration with 20 activities ~129ms.
What do I learn from this: My RdfPubClient library will not use JSON-LD
-
@naturzukunft I did a very crude measurement of my inbox path a while back and found that the JSON-LD processing took roughly the same time as verifying the HTTP signature.
Which seems a little excessive, for something that's basically a glorified parser.
-
@FenTiger this is less of a problem for me, as i want to support different rdf formats anyway. I use turtle in the test client. so json-ld is more of a
German: PAL (Problem Anderer Leute)
English: OPP (other people's problem) [<- never heard until now ;-)]