atomicdata-dev / atomic-server

An open source headless CMS / real-time database. Powerful table editor, full-text search, and SDKs for JS / React / Svelte.
https://atomicserver.eu
MIT License
1.01k stars 46 forks source link

Performance insights, Server-Timing, log duration of activities from server #256

Closed joepio closed 2 years ago

joepio commented 2 years ago

Atomic-Server is very fast, and I'd like to keep it that way. Or actually, I want more. Writing fast apps is addictive!

Anyways, in order to do this, I'd like to get more insights into what takes most time. I can do two things:

Server-Timing Header

Using headers has some nice advantages:

But implementing it could be a challenge. I'd like to provide at least the following insights:

joepio commented 2 years ago

I've added the header, but as expected it isn't that useful now, as 99% of the time is spent in get_resource. If I want to analyze what that does interenally, I could add a Timer as an argument when calling get_resource_extended. But I don't like adding more arguments there...