next.js
9dad4cd9 - Don't parse default postponedsizelimit (#89906)

Commit
162 days ago
Don't parse default postponedsizelimit (#89906) ## For Maintainers ### What? Optimize the `parseMaxPostponedStateSize` function by using a pre-calculated byte value for the default size limit instead of parsing it each time. ### Why? This optimization improves performance (though it's a very small impact) since `parseMaxPostponedStateSize` is in the hot path for rendering. By using a pre-calculated constant value for the default case, we avoid unnecessary parsing operations. ### How? - Added a constant `DEFAULT_MAX_POSTPONED_STATE_SIZE_BYTES` with the pre-calculated value of 100MB in bytes (104,857,600) - Modified `parseMaxPostponedStateSize` to return the pre-calculated constant when no size is provided - Only call `parseSizeLimit` when a custom size is specified
Author
Parents
Loading