[
https://issues.apache.org/jira/browse/LUCY-133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Marvin Humphrey updated LUCY-133:
---------------------------------
Attachment: lemon_json.patch
The attached file, lemon_json.patch, replaces our dependency on JSON::XS with
a custom JSON parser powered by the Lemon parser generator which operates
directly on Clownfish data structures. It is coded to the JSON spec, RFC 4627
([www.ietf.org/rfc/rfc4627.txt]), though certain unneeded features have been
left out (e.g. decoding of surrogate pair \u escapes, which trigger an error).
Since a stage of recursive conversion between Perl and Clownfish data
structures gets removed by this patch, we should see a performance
improvement. However, should JSON parsing and generation functions still show
up in profiling data, it is possible to optimize this implementation further
by operating on raw UTF-8 instead of handling most concatenation, encoding and
memory management via CharBuf's safe routines.
> Eliminate JSON::XS dependency
> -----------------------------
>
> Key: LUCY-133
> URL: https://issues.apache.org/jira/browse/LUCY-133
> Project: Lucy
> Issue Type: Task
> Components: Core
> Reporter: Marvin Humphrey
> Assignee: Marvin Humphrey
> Fix For: 0.3.0 (incubating)
>
> Attachments: lemon_json.patch
>
>
> Lucy currently depends on the CPAN module JSON::XS for encoding and decoding
> of JSON. JSON::XS has two drawbacks: it is Perl licensed, and it is a Perl
> module which other Lucy host bindings cannot use.
> We need to swap out JSON::XS with either a hand-rolled replacement or another
> library. However, we do not have to resolve this issue prior to the
> 0.1.0-incubating release, thanks to LEGAL-86.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira