{ "@context":"https://www.w3.org/ns/activitystreams", "type":"Collection", "id":"https://social.jayvii.de/objects/G_DxxoDGL2g/thread", "items":[ { "@context":[ "https://www.w3.org/ns/activitystreams", {"Hashtag":"as:Hashtag"} ], "published":"2024-07-29T14:43:56.078Z", "attributedTo":"https://social.jayvii.de/actors/jayvii", "replies":"https://social.jayvii.de/objects/G_DxxoDGL2g/replies", "to":["https://www.w3.org/ns/activitystreams#Public"], "cc":["https://social.jayvii.de/actors/jayvii/followers"], "content":"

After a few performance improvements, I did some loading time tests for #serci, between my home network (wifi) and a random VPN where the service is running.

echo \"html,redirect\" | tee timestamps.csv\r\nfor i in $(seq 1 1 100); do\r\n    HTML=$(curl -o /dev/null -s -w '%{time_total}' https://search.jayvii.de)\r\n    REDI=$(curl -o /dev/null -s -w '%{time_total}' https://search.jayvii.de?q=test)\r\n    echo \"$HTML,$REDI\" | tee --append timestamps.csv\r\ndone


Across 100 runs for loading the site's HTML (generated from pure #PHP) versus a redirect to a chosen service (here the default #MetaGer), I can measure on average 0.28s for loading the frontend (HTML) and 0.13s for processing input and issuing the redirect.

I am quite happy with this relatively low overhead, although performance may decrease a little if more services are added (currently: 47). At some point maybe an #sqlite database may be more efficient than my pre-constructed #json files which are loaded on-demand.

", "mediaType":"text/html", "attachment":[], "tag":[ {"type":"Hashtag","name":"#serci","href":"https://social.jayvii.de/tags/serci"}, {"type":"Hashtag","name":"#PHP","href":"https://social.jayvii.de/tags/PHP"}, {"type":"Hashtag","name":"#MetaGer","href":"https://social.jayvii.de/tags/MetaGer"}, {"type":"Hashtag","name":"#sqlite","href":"https://social.jayvii.de/tags/sqlite"}, {"type":"Hashtag","name":"#json","href":"https://social.jayvii.de/tags/json"} ], "type":"Note", "id":"https://social.jayvii.de/objects/G_DxxoDGL2g" } , { "@context":[ "https://www.w3.org/ns/activitystreams", {"Hashtag":"as:Hashtag"} ], "published":"2024-07-29T14:48:36.324Z", "attributedTo":"https://social.jayvii.de/actors/jayvii", "inReplyTo":"https://social.jayvii.de/objects/G_DxxoDGL2g", "replies":"https://social.jayvii.de/objects/7t5mkxEStDU/replies", "to":["https://social.jayvii.de/actors/jayvii","https://www.w3.org/ns/activitystreams#Public"], "cc":["https://social.jayvii.de/actors/jayvii/followers"], "content":"

btw, I did check changing the order of the curl-calls in the loop above. Caching is not a factor. The results stay the same.

", "mediaType":"text/html", "attachment":[], "type":"Note", "id":"https://social.jayvii.de/objects/7t5mkxEStDU" } , { "@context":[ "https://www.w3.org/ns/activitystreams", {"Hashtag":"as:Hashtag"} ], "published":"2024-07-29T14:50:39.502Z", "attributedTo":"https://social.jayvii.de/actors/jayvii", "inReplyTo":"https://social.jayvii.de/objects/7t5mkxEStDU", "replies":"https://social.jayvii.de/objects/7h_CbN68l8o/replies", "to":["https://social.jayvii.de/actors/jayvii","https://www.w3.org/ns/activitystreams#Public"], "cc":["https://social.jayvii.de/actors/jayvii/followers"], "content":"

Also: please do not ping my server with the above script yourself, thanks.

", "mediaType":"text/html", "attachment":[], "type":"Note", "id":"https://social.jayvii.de/objects/7h_CbN68l8o" } , { "@context":[ "https://www.w3.org/ns/activitystreams", {"Hashtag":"as:Hashtag"} ], "published":"2024-08-08T17:08:05.175Z", "attributedTo":"https://social.jayvii.de/actors/jayvii", "inReplyTo":"https://social.jayvii.de/objects/G_DxxoDGL2g", "replies":"https://social.jayvii.de/objects/h3JE0vb_tvI/replies", "to":["https://social.jayvii.de/actors/jayvii","https://www.w3.org/ns/activitystreams#Public"], "cc":["https://social.jayvii.de/actors/jayvii/followers"], "content":"

The move to a different VPS actually increased the performance for the HTML-building of #serci substantially from 0.28s above to 0.19s over 100 trials (also, this might have to do with #PHP updates and smarter Apache configuration). Redirection does not differ. This is likely the minimal overhead I can achieve.

", "mediaType":"text/html", "attachment":[], "tag":[ {"type":"Hashtag","name":"#serci","href":"https://social.jayvii.de/tags/serci"}, {"type":"Hashtag","name":"#PHP","href":"https://social.jayvii.de/tags/PHP"} ], "type":"Note", "id":"https://social.jayvii.de/objects/h3JE0vb_tvI" } ] }