index > XML Paper Specification (XPS) > XPS performance

XPS performance


Hi,
we're trying to replace our OLE compound file based image data storage with XPS documents.
One file contains 1-10000 bitmaps with a total size of up to several GBs..
With OLE compound files we got a data write rate of about 30 MB/s (on a reference machine).
Using XPS document I can't get more than 6 MB/s . Turning off compression doesn't speed things up.

My questions are:
- What causes this - factor 5 - overhead ?
- Is XPS the right technology for this application ?.

Her's the source code for the write - loop

using (XpsDocument document = new XpsDocument(destFileName, FileAccess.ReadWrite, CompressionOption.SuperFast))
{

IXpsFixedDocumentSequenceWriter docSeqWriter = document.AddFixedDocumentSequence();
IXpsFixedDocumentWriter docWriter = docSeqWriter.AddFixedDocument();
IXpsFixedPageWriter pageWriter = docWriter.AddFixedPage();
using (FileStream sourceStream = new FileStream(textImageName.Text, FileMode.Open))
{
int numtimes = int.Parse(textNumTimes.Text);
for (int i = 0; i < numtimes; i++)
{
XpsImage img = pageWriter.AddImage("image/jpeg");
Stream imgStream = img.GetStream();
sourceStream.Seek(0,
SeekOrigin.Begin);
CopyStream(sourceStream, imgStream);
img.Commit();
}
pageWriter.Commit();
document.Close();
}




Wolfgang B.
WolfgangB

Why are you XPS? Is it so you can view the images with an Xps Viewer? If this were the case I would suggest putting one per page. If you just want a virtual file system I would recommend you directly use the Package API.

Which version of WinFx do you have? We have done performance enhancements that I believe made it into Beta 2. In the scenario you describe signifigant performance enhancements were added to the Package system to handle very large numbers of parts.

Brian Adelberg
reply 2

You can use google to search for other answers

 

More Articles

• code samples for XPS filters and config module
• What is Indices attribute in Glyphs tag in the XPs document
• How to add Header and Footer to the flow documents?
• XPS Viewer Scriptable?
• MSOFFICE 2007 XPS Version Support
• Are WDP files openable in XML Paper Specification viewer?
• Under line of Glyphs
• Printing to specific output bin
• Sample XPS documents
• XPS-Enabled Print Device
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

• XPS Name when Sent to Printer
• Sample XPS documents
• How to not display the popup message in
• Will there be a windows mobile app?
• How to use "NavigationCommands.GoTo
• XPS Driver Does not Spool from WinWord D
• XPSDrv Sample
• Printer Pipeline Filter Sample
• print preview for xps document
• Creating XPS docs , without having any S
• Print Ticket/Print Capability Support in
• Problems viewing XPS files
• Can not open XPS document
• PrintTicket Error with PTConform.exe Tool
• I hope this format starts to leak before

Hot Articles

• cannot view xps with xpsviewer,need help
• Installing Vista drivers on XP
• PageImageable Size / BleedBox, Content Box
• USB Print
• How to not display the popup message in
• This thread has been moved. (Unable to D
• XPS performance
• XPS Viewer Scriptable?
• Sample XPS documents
• Printer Pipeline Filter Sample
• Adding custom properties and Thumbnail s
• xps viewer in Dec CTP?
• PrintTicket Error with PTConform.exe Tool
• error-'XpsImageType' does not exist in t
• JDF in XPS?

Recommend Articles

• PT/PC Support in Legacy Drivers
• AbbrGeom syntax
• Under line of Glyphs
• Query about the Print Capabilities
• XPS-Enabled Print Device
• USB Print
• Where/How is DocumentStructure is refere
• what's wrong with the DocumentViewer's F
• xps viewer in Dec CTP?
• What is Indices attribute in Glyphs tag
• XSD(XML Schema Definition) file regardin
• XPS Document Writer on XP
• XPS performance
• How to add metadata such as date, creato
• Printing to XPS from MS Word 2003 failed