Skip to content

Commit

Permalink
don't spread astroGlobalPartial into astroGlobalCombined
Browse files Browse the repository at this point in the history
this change improves the server stress latency of the benchmark by about 25%
  • Loading branch information
LeanderG committed Apr 11, 2024
1 parent d1080ea commit 91d4572
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/astro/src/core/render-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ export class RenderContext {

// `Astro.self` is added by the compiler
const astroGlobalCombined: Omit<AstroGlobal, 'self'> = {
...astroGlobalPartial,
generator: astroGlobalPartial.generator,
glob: astroGlobalPartial.glob,
cookies,
get clientAddress() {
return renderContext.clientAddress();
Expand Down

0 comments on commit 91d4572

Please sign in to comment.