File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,6 +28,11 @@ const schema = z.object({
2828// ...and 59 more
2929```
3030
31+ ### v27.2.5
32+
33+ - Reduced memory footprint at runtime: deferred population of well-known headers to Documentation;
34+ - Faster header lookup in Documentation generator (only when ` headers ` enabled in ` inputSources ` ).
35+
3136### v27.2.4
3237
3338- Fixed performance regression since v24.0.0:
Original file line number Diff line number Diff line change 1+ import { bench } from "vitest" ;
2+ import { getWellKnownHeaders } from "../src/well-known-headers" ;
3+
4+ const target = "x-frame-options" ;
5+
6+ describe ( "Array.includes vs Set.has for well-known headers lookup" , ( ) => {
7+ const headersArray = Array . from ( getWellKnownHeaders ( ) ) ;
8+
9+ bench ( "Array.includes" , ( ) => {
10+ headersArray . includes ( target ) ;
11+ } ) ;
12+
13+ bench ( "Set.has" , ( ) => {
14+ getWellKnownHeaders ( ) . has ( target ) ;
15+ } ) ;
16+ } ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ import { ezRawBrand } from "./raw-schema";
4545import { FirstPartyKind } from "./schema-walker" ;
4646import { Security } from "./security" ;
4747import { ezUploadBrand } from "./upload-schema" ;
48- import wellKnownHeaders from "./well-known-headers" ;
48+ import { getWellKnownHeaders } from "./well-known-headers" ;
4949
5050interface ReqResCommons {
5151 makeRef : (
@@ -272,7 +272,7 @@ export const defaultIsHeader = (
272272) : name is `x-${string } ` =>
273273 familiar ?. has ( name ) ||
274274 name . startsWith ( "x-" ) ||
275- wellKnownHeaders . includes ( name ) ;
275+ getWellKnownHeaders ( ) . has ( name ) ;
276276
277277export const depictRequestParams = ( {
278278 path,
You can’t perform that action at this time.
0 commit comments