Re:A 1.5GB String
by xigoi on Sunday April 09, 2023 @07:41AM
(#35501790)
XML would also have a problem with this: you'd replace < with <, then with &lt;, then with &amp;lt;, … It's not exponential, but still inefficient.
[ Parent
| on HN ]
Inefficient is not the same as problematic. They turned what otherwise would be a linear increase in memory usage into an exponential increase, which expectedly resulted in memory exhaustion problems.
There are plenty of problems to go around this approach and overall system design, but the weakest link is undoubtedly how JSON was used.
Can you imagine arguing in a tech meeting that a reason not to use JSON is that it doesn't support unbounded recursive levels of escaping very well?