-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Closed
Labels
area: performanceIssues related to performanceIssues related to performanceeffort2: daysstate: Needs Design
Description
Right now, the Response object lazily parses the response body, based on what "getter" method is called: json(), text(), etc. The json method will attempt to parse the body at the time the method is called, which can be expensive for large requests. By allowing the response type to be declared ahead of time, XMLHttpRequest can perform the parsing on a separate thread before firing the load event.
Supporting this would be easy, but some thought should be given to how this should affect the existing fetch-response-like "getters" design, and how that design may encourage less-performant behavior.
CC: @IgorMinar
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: performanceIssues related to performanceIssues related to performanceeffort2: daysstate: Needs Design