Optimierung 3.4: Performance (Logging terminable, Single-Purchase memoisiert)
- LogApiUsage als terminable Middleware: der ApiUsageLog-INSERT laeuft nach gesendeter Antwort und verlaengert nicht mehr die Request-Dauer. Startzeit wird ueber ein Request-Attribut uebergeben (terminate() laeuft auf frischer Instanz). - User::openSinglePurchaseCount() memoisiert die offenen Einmalkaeufe pro Request. Vorher wurde derselbe grantingSubmission-Count im Status-Widget mehrfach (Quota-Total, Quota-Remaining, openSinglePurchases) plus ein exists() in hasActiveBooking abgesetzt -> jetzt eine Query. - CustomerCompanyContext::selectedCompany() nutzt eine einzige first()-Query statt exists()+first(); das Verwerfen nicht (mehr) erreichbarer Auswahlen bleibt erhalten. - LegacySubscriptionService::cancelBundleFor() ist ein einziges Bulk-Update statt Update-pro-Iteration (UserPaymentOption hat keine Observer/Events). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f2c349ac2c
commit
9ed429fe74
6 changed files with 56 additions and 19 deletions
|
|
@ -54,7 +54,7 @@ class CustomerStatusSummary
|
|||
hasActiveBooking: $user->hasActiveBooking(),
|
||||
hasSubscription: $hasSubscription,
|
||||
hasGrandfathered: $hasGrandfathered,
|
||||
openSinglePurchases: $user->singlePurchases()->grantingSubmission()->count(),
|
||||
openSinglePurchases: $user->openSinglePurchaseCount(),
|
||||
unlimitedQuota: $user->hasUnlimitedPressReleaseQuota(),
|
||||
quotaTotal: $user->pressReleaseQuotaTotal(),
|
||||
quotaRemaining: $user->pressReleaseQuotaRemaining(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue