EldoS | Feel safer!

Software components for data protection, secure storage and transfer

TElXMLDocument.LoadFromStream slow?

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#2225
Posted: 02/11/2007 16:19:15
by Stanko Milošev (Standard support level)
Joined: 10/08/2006
Posts: 37

I have 547kb XML file, SBB load and sign file in 10 seconds, while XML sec do it in one second.

As much as I could see LoadFromStream takes most of the time. Is there any faster method for parsing XML file?

I am using 5.0.105 version of SBB, registered with license which I get with previous version.
#2226
Posted: 02/12/2007 03:08:17
by Eugene Mayevski (EldoS Corp.)

It's possible that XMLSec doesn't actually parse the file. SecureBlackbox always parses the data. What we need to do is improve parsing speed. This will be looked at.


Sincerely yours
Eugene Mayevski
#2238
Posted: 02/12/2007 07:03:28
by Stanko Milošev (Standard support level)
Joined: 10/08/2006
Posts: 37

Ok, but signing in XML Sec works much faster, then in SBB, so for now we are forced to use XML Sec, instead of SBB. Is it possible to tell me when are your plans to improve speed?

We would like to continue to use SBB, since it is much easier programming with SBB, but we will have even bigger XML files.
#2241
Posted: 02/12/2007 07:20:34
by Eugene Mayevski (EldoS Corp.)

Quote
Stanko Milošev wrote:
signing in XML Sec works much faster, then in SBB


Not signing, but loading of the document.
It's possible to sign the data as binary (and not as XML data), then signing with SBB wil be fast too.

Quote
Stanko Milošev wrote:
Is it possible to tell me when are your plans to improve speed?


No ideas.


Sincerely yours
Eugene Mayevski
#2247
Posted: 02/12/2007 09:06:16
by Stanko Milošev (Standard support level)
Joined: 10/08/2006
Posts: 37

Now I have problem with this line of code:

_XMLDocument.SaveToStream(_FileStream, xcmCanon, 'utf-8');

This never finnish, I was waiting 2 minutes, I didn't have patience for more :)

This line is finnished in a second:

_XMLDocument.SaveToStream(_FileStream);

Now what?
#2263
Posted: 02/13/2007 01:32:21
by Stanko Milošev (Standard support level)
Joined: 10/08/2006
Posts: 37

Hello again,

I solved my problem, actualy, I didn't need _XMLDocument.SaveToStream(_FileStream, xcmCanon, 'utf-8');

I just put

_XMLDocument.SaveToStream(_FileStream);

Now it works, little slow, but we will survive, it would be pity not to use such good product :)

I have one small question:

Quote

It's possible to sign the data as binary (and not as XML data), then signing with SBB wil be fast too.


How can I do this?

Thank you thousands time, for such a good product, and great support.
#2283
Posted: 02/13/2007 12:50:12
by Dmytro Bogatskyy (EldoS Corp.)

Quote
I have one small question:
Quote
It's possible to sign the data as binary (and not as XML data), then signing with SBB wil be fast too.
How can I do this?

First, the signature should be saved as separate file (detached signature).
For example:
Code
Signer.SignatureType := xstDetached;
Node := nil;
Signer.Save(Node);
try
   // ...
finally
   // because new TElXMLDocument created on Signer.Save(Node) call, when Node = nil
   Node.OwnerDocument.Free;
end;


Second, the reference itself should point to file data, so load data to buffer and set:
Reference.URIData := ...
and then update all references digest
Signer.UpdateReferencesDigest;

If file big, you can use TElHashFunction class to calculate digest (it supports streams)
and then set digest value of the reference directly:
Reference.DigestValue := HashFunction.Finish;
In this case donn't call Signer.UpdateReferencesDigest method.
Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.

Reply

Statistics

Topic viewed 2704 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!