View Issue Details

IDProjectCategoryView StatusLast Update
0004457Compliance Test Tool (CTT) Unified Architecture5 - General Problempublic2019-07-25 15:22
ReporterBernd Edlinger Assigned ToAlexander Allmendinger  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformPCOSWindowsOS Version8.1
Product Version1.03.341.383 
Target Version1.03Fixed in Version1.03.341.383 
Summary0004457: Data Access AnalogItemType/010.js is way too slow
Description

The problem is with the Softing SDK, the test case creates 5.000 MIs
in one subscription, and the nested loop takes around 20 minutes
to process one publish response. Quadratic complexity, since both
the Publish response and the TempAnalogItems have 5.000 elements,
and, unfortunately the looked up item is always found at the end
of the TempAnalogItems array.

Proposed fix below: use ClientHandle as an index in the array,
to peel off one nested loop.

--- "maintree/Data Access/Data Access Analog/Test Cases/010.js" 2018-11-06 18:09:42.000000000 +0100
+++ "maintree/Data Access/Data Access Analog/Test Cases/010.js" 2018-11-12 21:11:39.880602293 +0100
@@ -36,13 +36,12 @@
var nNumFailure = 0;
for( var d=0; d<PublishHelper.CurrentDataChanges.length; d++ ) {
for( var m=0; m<PublishHelper.CurrentDataChanges[d].MonitoredItems.length; m++ ) {

  • var mi = 0;
  • var mi = PublishHelper.CurrentDataChanges[d].MonitoredItems[m].ClientHandle;
    var found = false;
    // search item in current data changes
  • for( mi = 0; mi < TempAnalogItems.length; mi++ ) {
  • if( TempAnalogItems[mi].ClientHandle == PublishHelper.CurrentDataChanges[d].MonitoredItems[m].ClientHandle ) {
  • if( mi < TempAnalogItems.length ) {
  • if( TempAnalogItems[mi].ClientHandle == mi ) {
    found = true;
  • break;
    }
    }

@@ -54,9 +53,9 @@
addError("DataType received for analog node '" + TempAnalogItems[mi].NodeSetting + "' does not match the expected type.\n\t Expected datatype: " + BuiltInType.toString ( currentNodeDataType ) + "\n\t Received datatype: " + BuiltInType.toString ( PublishHelper.CurrentDataChanges[d].MonitoredItems[m].Value.Value.DataType) );
nNumFailure++;
}

  • TempAnalogItems[mi].ClientHandle = -1;
    }
    // Now remove the item we just checked
  • TempAnalogItems.splice(mi, 1);
    }
    }
    // Just check if we received responses for all our analog nodes
    --- "maintree/Data Access/Data Access Analog/Test Cases/initialize.js" 2018-11-06 18:09:42.000000000 +0100
    +++ "maintree/Data Access/Data Access Analog/Test Cases/initialize.js" 2018-11-12 21:08:13.366667124 +0100
    @@ -32,6 +32,7 @@
    var euBrowsePaths = [];
    var translateResults = [];
    for( var i=0; i<AnalogItems.length; i++ ) {
  • AnalogItems[i].ClientHandle = i;
    euBrowsePaths.push( UaBrowsePath.New( { StartingNode: AnalogItems[i], RelativePathStrings: [ "EURange" ] } ) );
    translateResults.push( new ExpectedResults( { Expected: [ StatusCode.Good, StatusCode.BadNoMatch ] } ) );
    }
TagsNo tags attached.
Files Affected

Activities

Alexander Allmendinger

2018-12-13 12:59

developer   ~0009683

Followed suggestion.

Paul Hunkar

2019-07-25 15:21

administrator   ~0010612

Reviewed in CMP Call

Issue History

Date Modified Username Field Change
2018-11-13 06:57 Bernd Edlinger New Issue
2018-12-07 14:33 Paul Hunkar Assigned To => Alexander Allmendinger
2018-12-07 14:33 Paul Hunkar Status new => assigned
2018-12-13 12:59 Alexander Allmendinger Note Added: 0009683
2018-12-13 12:59 Alexander Allmendinger Status assigned => resolved
2018-12-13 12:59 Alexander Allmendinger Fixed in Version => 1.03.341.383
2018-12-13 12:59 Alexander Allmendinger Resolution open => fixed
2019-01-28 14:14 Paul Hunkar Category General Problem => 4 - General Problem
2019-01-28 14:15 Paul Hunkar Category 4 - General Problem => 5 - General Problem
2019-07-25 15:21 Paul Hunkar Status resolved => closed
2019-07-25 15:21 Paul Hunkar Note Added: 0010612
2019-07-25 15:22 Paul Hunkar Target Version => 1.03