[
https://issues.apache.org/jira/browse/TRAFODION-2422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15796786#comment-15796786
]
ASF GitHub Bot commented on TRAFODION-2422:
-------------------------------------------
Github user zellerh commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/900#discussion_r94516660
--- Diff: core/sql/executor/hiveHook.cpp ---
@@ -468,7 +468,8 @@ struct hive_skey_desc* populateSortCols(HiveMetaData
*md, Int32 sdID,
"populateSortCols::sortCols:],###"))
return NULL;
-
+ if ((foundE - pos)<=10) //this is important to avoid major performance
impact when looking for non existent Order(col over and over, parsing to the
end of string. hot spot flagged using gprof
--- End diff --
Would be good to add a comment here that we are testing for the string
sortCols:[], which happens to be 10 characters long. Or, better to use
strlen("sortCols:[]").
> populateSortCols was flagged as major perf offender during profiling
> --------------------------------------------------------------------
>
> Key: TRAFODION-2422
> URL: https://issues.apache.org/jira/browse/TRAFODION-2422
> Project: Apache Trafodion
> Issue Type: Improvement
> Components: sql-cmp
> Reporter: Eric Owhadi
> Priority: Minor
> Fix For: 2.2-incubating
>
>
> the reason being an unbound iterative string search on huge string.
> Added a minor fix: When not setting category in log conf file, extra code is
> executed, potentially impacting performance
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)