[
https://issues.apache.org/jira/browse/IMPALA-13843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17937070#comment-17937070
]
ASF subversion and git services commented on IMPALA-13843:
----------------------------------------------------------
Commit 31e48c3cdfe0e43cbaa64a32ee8d2f956af22626 in impala's branch
refs/heads/master from Surya Hebbar
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=31e48c3cd ]
IMPALA-13843: Support usage of strings directly in rapidjson
The RapidJSON library recalculates length of a StringRef each time
when using char*, until null character.
Within the codebase, many times we convert from string to char* for
RapidJSON.
Instead with RAPIDJSON_HAS_STDSTRING, we can use strings directly,
which inherently contain the size, instead of recalculating each time.
This is a major convenience and a bit more efficient during both
JSON generation and parsing.
This simplifies many methods(i.e. AddMember, HasMember, etc) and
the creation of Document::Value.
This does not remove compatibility for existing char* and still remains
as a stable feature within RapidJSON.
Change-Id: I84c6f17690f7a2e958a6dfbb3637832f5ab6ee53
Reviewed-on: http://gerrit.cloudera.org:8080/22613
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
> Use strings directly in rapidjson without conversion to char*
> -------------------------------------------------------------
>
> Key: IMPALA-13843
> URL: https://issues.apache.org/jira/browse/IMPALA-13843
> Project: IMPALA
> Issue Type: New Feature
> Reporter: Surya Hebbar
> Assignee: Surya Hebbar
> Priority: Major
>
> The RapidJSON library recalculates length of a StringRef each time when using
> char*, until null character.
> Within the codebase, many times we are converting from string->char* for
> RapidJSON.
> Instead with RAPIDJSON_HAS_STDSTRING, we can use strings directly, which
> contain the size, instead of recalculating or size declaration each time.
> This is efficient and a major convenience for DOM creation.
> This impacts large JSON profiles, where this is repeated multiple times.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]