Skip to content

perf(dav): only create the calendar reminder providers when used - #65429

Closed
CarlSchwan wants to merge 1 commit into
masterfrom
carl/dav-lazy-reminder-providers
Closed

CarlSchwan wants to merge 1 commit into
masterfrom
carl/dav-lazy-reminder-providers

Conversation

@CarlSchwan

Copy link
Copy Markdown
Member

Summary

Instead of instantiating then for each requests, do it only when needed.

This saves about 0.5ms on every request, around 3% of a request with almost no work of its own.

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Instead of instanciating then for each requests, do it only when needed.

This saves about 0.5ms on every request, around 3% of a request with
almost no work of its own.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Carl Schwan <carl@carlschwan.eu>

@come-nc come-nc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That’s only on PHP<8.4, no? On 8.4 you get a ghost anyway?

@CarlSchwan

Copy link
Copy Markdown
Member Author

That’s only on PHP<8.4, no? On 8.4 you get a ghost anyway?

We are doing $provider = Server::get($providerClassName); and iirc lazy ghost are only for DI

@CarlSchwan

Copy link
Copy Markdown
Member Author

Actually I was running on php 8.3, with php 8.5 the difference is not worth it

@CarlSchwan CarlSchwan closed this Oct 13, 2026
@come-nc

come-nc commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

That’s only on PHP<8.4, no? On 8.4 you get a ghost anyway?

We are doing $provider = Server::get($providerClassName); and iirc lazy ghost are only for DI

I wanted to do that initially, because usually when doing Server::get it’s because you’re gonna use the class anyway, but I never did that, because it was complicated to properly differentiate this with DI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants