You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cripts: shrink Context from 3408 to 1920 bytes, expand data[] to 16 (#13195)
* cripts: shrink Context from 3408 to 1920 bytes, expand data[] to 16
Pimpl Url::Path and Url::Query state behind unique_ptr so the heavy
vector/unordered_map/cripts::string members only allocate when a script
actually decomposes the path or query. Lazy-allocate Pristine, Parent,
and Remap From/To URLs in _UrlBlock — they're rarely all touched, and
the embedded 384-byte Url objects dominated the per-txn cost. Pimpl
Error::Reason for the same reason. Drop the unused INET6_ADDRSTRLEN
buffer in detail::ConnBase. Make cripts::Url's destructor virtual now
that we delete via unique_ptr. Bump CONTEXT_DATA_SLOTS from 4 to 16
so scripts have room to stash more per-txn state — the 384-byte cost
sits inside the budget freed by the URL/Connection cuts.
* Address Copilot's review comments
Bounds-check Path::Erase to avoid dereferencing a null _owner when
ix is out of range — operator[] returns a default-constructed String
in that case, and the subsequent p.operator=("") would then crash
inside String::operator=.
0 commit comments