Hi Philipp,
As Eli commented in this thread, the decoding is must have for all external
libraries no matter what is their contract.
Thanks,
Ivan
On Sun, Apr 21, 2019 at 3:59 PM Philipp Stephani
wrote:
> Am So., 21. Apr. 2019 um 12:24 Uhr schrieb yyoncho :
> >
> > Hi Eli,
> >
> >>
> >> In any case, even if decoding takes 50% of the time we spend in Emacs
> >> code, it is still not significant enough to justify the un-safety of
> >> using a string that we didn't decode, because if that string ever
> >> includes raw bytes, Emacs will surely crash.
> >
> >
> > IMO if validation of the data that comes from external libraries is
> taking a lot of time then it does not make sense to use external libraries
> at all when we are aiming for performance gains.
>
>
> There's no need to validate Jansson's output because it already
> validates that the input is valid UTF-8, and never generates invalid
> strings.
>