bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31138: Native json slower than json.el


From: Philipp Stephani
Subject: bug#31138: Native json slower than json.el
Date: Sun, 21 Apr 2019 15:33:33 +0200

Am So., 21. Apr. 2019 um 15:10 Uhr schrieb yyoncho <address@hidden>:
>
> Hi Philipp,
>
> As Eli commented in this thread, the decoding is must have for all external 
> libraries no matter what is their contract.

I disagree.

>
> Thanks,
> Ivan
>
> On Sun, Apr 21, 2019 at 3:59 PM Philipp Stephani <address@hidden> wrote:
>>
>> Am So., 21. Apr. 2019 um 12:24 Uhr schrieb yyoncho <address@hidden>:
>> >
>> > 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]