[
https://issues.apache.org/jira/browse/S2GRAPH-11?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15095873#comment-15095873
]
ASF GitHub Bot commented on S2GRAPH-11:
---------------------------------------
GitHub user SteamShon opened a pull request:
https://github.com/apache/incubator-s2graph/pull/5
[S2GRAPH-11] remove JsNumber.as[Double] on sortBy in PostProcess.
remove JsNumber.as[Double] on sortBy in PostProcess.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/SteamShon/incubator-s2graph S2GRAPH-11
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-s2graph/pull/5.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #5
----
commit f242b0b43305a41b7228ed11f2eca31f850824b3
Author: SteamShon <[email protected]>
Date: 2016-01-06T09:31:02Z
[S2GRAPH-11] remove JsNumber.as[Double] on sortBy in PostProcess.
----
> Performance tuning on sort by scoreSum on PostProcess
> -----------------------------------------------------
>
> Key: S2GRAPH-11
> URL: https://issues.apache.org/jira/browse/S2GRAPH-11
> Project: S2Graph
> Issue Type: Improvement
> Reporter: DOYUNG YOON
> Assignee: DOYUNG YOON
> Labels: performance
> Original Estimate: 72h
> Remaining Estimate: 72h
>
> when query has group by, current implementation first build array of json
> object with scoreSum. after that sort this array by looking up json path with
> “scoreSum” key which is unnecessary. worse part is after look up, JsValue
> need to be casted as double which is very slow. profiling with visualvm shows
> that this JsValue.as[Double] use 7% of cpu cycle.
> we already know what is scoreSum before sorting and costly operation like
> JsValue.as[Double] should be avoided for performance tuning.
> this affect query performance a lot since JsValue.as[Double] should be run on
> every result edges.
> for example, 10k query per second with average result size 100, then 10k x
> 100 call per second on as[Double] will be called.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)