You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Steve Lawrence (Jira)" <ji...@apache.org> on 2021/08/12 14:09:00 UTC

[jira] [Resolved] (DAFFODIL-2198) Use sortInPlace in sortChildNodesByPosition when we move to Scala 2.13

     [ https://issues.apache.org/jira/browse/DAFFODIL-2198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Lawrence resolved DAFFODIL-2198.
--------------------------------------
    Resolution: Won't Fix

sortChildNodesByPosition doesn't actually exist in the codebase anymore. I can't find it in any git logs, so maybe it never existed and it got renamed during PR review?

But I think this is talking about the flattenAndValidateChildNodes function, which is used to reorder unordered sequences to schema definition order. And it's suggesting to use sort in place as a performance improvement.

But the logic in that function isn't super trivial, there's more going on than just sorting; there's merging, error checking, fast lookup logic, etc. Maybe it's possible to make this more efficient even with the complexities involved, but unless we find that this is a bottleneck with profiling, I suggest we don't worry about changing this.

Resolving as won't fix.

> Use sortInPlace in sortChildNodesByPosition when we move to Scala 2.13
> ----------------------------------------------------------------------
>
>                 Key: DAFFODIL-2198
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2198
>             Project: Daffodil
>          Issue Type: Improvement
>          Components: Performance
>    Affects Versions: 2.5.0
>            Reporter: Josh Adams
>            Priority: Minor
>
> In InfosetImpl.scala's sortChildNodesByPosition() we are creating a sorted copy of the childNodes, instead of sorting in place.  Scala 2.13 has a sortInPlace function for ArrayBuffers, so we should use that once it is available.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)