hsuzuki

Debug mode and Service mode

Discussion created by hsuzuki on Feb 26, 2013
Latest reply on Feb 27, 2013 by hsuzuki

Hi vCampus team,

 

I'm writing a codes on ACE and I have a question about a performance between debug mode and service mode.  When I executed below codes, it took 9 seconds. But it took 26 seconds when I execute this in the PI ACE 2.x Scheduler service. This program reads text csv file which has a list of 3600 tag name and retrieves the PI tag attributes (i.e. descriptor and engunits) for each PI tags. I'd like to know what difference between debug mode (takes 9 seconds) and service mode (takes 26 seconds). ACE version is 2010 R2 SP1 and PI Server version 3.4.364.32 as a separate box.

 

 

 

In the InitializePIACEPoints()...

 

         Dim csvname As String = "C:\config\ACE.cfg"

 

         myPIServer.MessageLog.PutString("Start1 :InitializePIACEPoints" + System.DateTime.Now)

 
            Using parser As New TextFieldParser(csvname, System.Text.Encoding.GetEncoding("Shift_JIS"))
                parser.TextFieldType = FieldType.Delimited
                parser.SetDelimiters(",")

                While Not parser.EndOfData
                    Dim row As String() = parser.ReadFields()
                    row(0) = row(0).Replace(vbCrLf, "n")

                    ptList2 = igp2.GetPoints2("tag = '" + row(0) + "'", retAttributes, GetPointsRetrievalTypes.useGetPoints)
                    If ptList2.Count > 0 Then
                        pt = ptList2.Item(1)
                        ptlist.Add(pt)
                        arrDesc.Add(pt.PointAttributes("descriptor").Value)
                        arrUnit.Add(pt.PointAttributes("EngUnits").Value)
                    Else
                        errFlag = True
                    End If
                End While
            End Using
        myPIServer.MessageLog.PutString("End :InitializePIACEPoints" + System.DateTime.Now) 
 

Thanks,

 

Hiroyuki Suzuki

 

Customer Support Engineer

 

OSIsoft Japan

 

 

Outcomes