EldoS | Feel safer!

Software components for data protection, secure storage and transfer

TElXMLDOMDocument performance

Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.
#30236
Posted: 08/07/2014 14:05:40
by Mauricio Ahumada (Standard support level)
Joined: 06/16/2014
Posts: 7

Hello. We are doing XMLSignatures on a windows Phone 6.1 device with no mayor problems using the SecureBlackBox Libraries, however we manage to notice a slow performance on the process and pinpointed the problem to the Load method of the TElXMLDOMDocument class.

I've already checked this topic (https://eldos.com/forum/read.php?FID=7&TID=3364) where the issue was discussed, however i could not get anything useful out of it.

I've tried both methods:
XMLDocument.LoadFromFile(FileName);
XMLDocument.LoadFromStream(sr);

when loading a 5.71kb (very small) XML for signing, when no mayor differencen in speed when loading. The average time just loading the file is 11 seconds.

Any help would be appreciated.

The file being loaded is the following

Code
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<CreditNote xmlns="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDatatypes-2" xmlns:sac="urn:sunat:names:specification:ubl:peru:schema:xsd:SunatAggregateComponents-1" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ext:UBLExtensions>
<ext:UBLExtension>
<ext:ExtensionContent>
<DatosAdicionales>
<DatoAdicional>
<Codigo>01</Codigo>
<Valor>CALLAO</Valor>
</DatoAdicional>
<DatoAdicional>
<Codigo>02</Codigo>
<Valor>2014-06-16</Valor>
</DatoAdicional>
<DatoAdicional>
<Codigo>03</Codigo>
<Valor>123-8935</Valor>
</DatoAdicional>
<DatoAdicional>
<Codigo>04</Codigo>
<Valor>LIMA*121*313-8*Enviado*CALLAO*324-43*</Valor>
</DatoAdicional>
<DatoAdicional>
<Codigo>05</Codigo>
<Valor>VEINTINUEVE CON 10/100  NUEVOS SOLES</Valor>
</DatoAdicional>
<DatoAdicional>
<Codigo>06</Codigo>
<Valor>-</Valor>
</DatoAdicional>
<DatoAdicional>
<Codigo>07</Codigo>
<Valor>-</Valor>
</DatoAdicional>
<DatoAdicional>
<Codigo>08</Codigo>
<Valor>Estimado cliente,puede consultar sus comprobantes en nuestra web</Valor>
</DatoAdicional>
<DatoAdicional>
<Codigo>09</Codigo>
<Valor>-</Valor>
</DatoAdicional>
<DatoAdicional>
<Codigo>10</Codigo>
<Valor>-</Valor>
</DatoAdicional>
</DatosAdicionales>
</ext:ExtensionContent>
</ext:UBLExtension>
<ext:UBLExtension>
<ext:ExtensionContent>
<sac:AdditionalInformation>
<sac:AdditionalMonetaryTotal>
<cbc:ID>1001</cbc:ID>
<cbc:PayableAmount currencyID="PEN">24.66</cbc:PayableAmount>
</sac:AdditionalMonetaryTotal>
<sac:AdditionalMonetaryTotal>
<cbc:ID>1002</cbc:ID>
<cbc:PayableAmount currencyID="PEN">0.00</cbc:PayableAmount>
</sac:AdditionalMonetaryTotal>
<sac:AdditionalMonetaryTotal>
<cbc:ID>1003</cbc:ID>
<cbc:PayableAmount currencyID="PEN">0.00</cbc:PayableAmount>
</sac:AdditionalMonetaryTotal>
</sac:AdditionalInformation>
</ext:ExtensionContent>
</ext:UBLExtension>
<ext:UBLExtension>
<ext:ExtensionContent>
</ext:ExtensionContent>
</ext:UBLExtension>
</ext:UBLExtensions>
<cbc:UBLVersionID>2.0</cbc:UBLVersionID>
<cbc:CustomizationID>1.0</cbc:CustomizationID>
<cbc:ID>FF11-10000011</cbc:ID>
<cbc:IssueDate>2014-06-25</cbc:IssueDate>
<cbc:DocumentCurrencyCode>PEN</cbc:DocumentCurrencyCode>
<cac:DiscrepancyResponse>
<cbc:ReferenceID>FF11-10000006</cbc:ReferenceID>
<cbc:ResponseCode>05</cbc:ResponseCode>
<cbc:Description>DESCUENTO POR ITEM</cbc:Description>
</cac:DiscrepancyResponse>
<cac:BillingReference>
<cac:InvoiceDocumentReference>
<cbc:ID>FF11-10000006</cbc:ID>
<cbc:DocumentTypeCode>01</cbc:DocumentTypeCode>
</cac:InvoiceDocumentReference>
</cac:BillingReference>
<cac:Signature>
<cbc:ID>IDSign20261180937</cbc:ID>
<cac:SignatoryParty>
<cac:PartyIdentification>
<cbc:ID>20261180937</cbc:ID>
</cac:PartyIdentification>
<cac:PartyName>
<cbc:Name><![CDATA[British American Tobacco del Peru S.A.C.]]></cbc:Name>
</cac:PartyName>
</cac:SignatoryParty>
<cac:DigitalSignatureAttachment>
<cac:ExternalReference>
<cbc:URI>#signature20261180937</cbc:URI>
</cac:ExternalReference>
</cac:DigitalSignatureAttachment>
</cac:Signature>
<cac:AccountingSupplierParty>
<cbc:CustomerAssignedAccountID>20261180937</cbc:CustomerAssignedAccountID>
<cbc:AdditionalAccountID>6</cbc:AdditionalAccountID>
<cac:Party>
<cac:PartyName>
<cbc:Name><![CDATA[British American Tobacco del Peru S.A.C.]]></cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:ID>150103</cbc:ID>
<cbc:StreetName>Pje Santa Rosa N° 256 Ate Lima</cbc:StreetName>
<cac:Country>
<cbc:IdentificationCode>PE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyLegalEntity>
<cbc:RegistrationName><![CDATA[British American Tobacco del Peru S.A.C.]]></cbc:RegistrationName>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cbc:CustomerAssignedAccountID>20514792624</cbc:CustomerAssignedAccountID>
<cbc:AdditionalAccountID>6</cbc:AdditionalAccountID>
<cac:Party>
<cac:PhysicalLocation>
<cbc:Description><![CDATA[AVENIDA RIVERA NAVARRETE  NRO 645  INT P3 Desconocido]]></cbc:Description>
</cac:PhysicalLocation>
<cac:PartyLegalEntity>
<cbc:RegistrationName><![CDATA[CONSORCIO MULTISER.HNOS GUTIERRES]]></cbc:RegistrationName>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:CreditNoteLine>
<cbc:ID>1</cbc:ID>
<cbc:CreditedQuantity unitCode="PQ">1</cbc:CreditedQuantity>
<cbc:LineExtensionAmount currencyID="PEN">24.66</cbc:LineExtensionAmount>
<cac:PricingReference>
<cac:AlternativeConditionPrice>
<cbc:PriceAmount currencyID="PEN">29.10</cbc:PriceAmount>
<cbc:PriceTypeCode>01</cbc:PriceTypeCode>
</cac:AlternativeConditionPrice>
</cac:PricingReference>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="PEN">4.44</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxAmount currencyID="PEN">4.44</cbc:TaxAmount>
<cbc:Percent>18</cbc:Percent>
<cac:TaxCategory>
<cbc:ID>AC</cbc:ID>
<cbc:TaxExemptionReasonCode>10</cbc:TaxExemptionReasonCode>
<cac:TaxScheme>
<cbc:ID>1000</cbc:ID>
<cbc:Name>IGV</cbc:Name>
<cbc:TaxTypeCode>VAT</cbc:TaxTypeCode>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:Item>
<cbc:Description><![CDATA[HM Blue SQ 10 ]]></cbc:Description>
<cac:SellersItemIdentification>
<cbc:ID><![CDATA[T1914796]]></cbc:ID>
</cac:SellersItemIdentification>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="PEN">24.66</cbc:PriceAmount>
</cac:Price>
</cac:CreditNoteLine>
</CreditNote>
#30238
Posted: 08/08/2014 04:20:57
by Dmytro Bogatskyy (EldoS Corp.)

Moved to helpdesk ( https://www.eldos.com/helpdesk/ ). You will see your (and only your) support tickets by following this URL. You will also get e-mail notifications about updates related to your support ticket.

Reply

Statistics

Topic viewed 840 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!