-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Fully Compatible
-
ALL
When various append methods of BSONObjBuilder get inlined they all sooner or later inline grow_reallocate().
The grow_reallocate has std::stringstream variable on a local stack (~400 bytes). All that space is allocated in the caller stack frame when the callee is inlined.
There is code that calls append many times and each inlined call incurs 400 bytes penalty. It quickly adds up to huge stack frames.