none
OS call getting more time in V4 printer driver than V3 printer driver (PTMergeAndValidatePrintTicket) RRS feed

  • Question

  • Hi,

    While doing profiling my code base of V3 printer driver and V4 printer driver separately, I found PTMergeAndValidatePrintTicket(), which is a OS call, is taking more time in case of V4 printer driver.

    In V3 printer driver, when this API is called from different filters it takes around 0.16 secs each time. Where as in case of V4 printer driver, it takes around 0.48 secs. Now my question is why this difference happens ? Is this call implemented differently for V3 and V4 Printer driver in OS? Is these time difference expected from OS?

    Thanks & Regards,

    San

    Tuesday, June 3, 2014 9:04 AM

Answers

  • Hi San,

    The performance of PTMergeAndValidatePrintTicket is dependent on the complexity of the driver that it is called against. For example, a driver with no constraints specified in a GPD file will be faster than one with many constraints, and a driver with constraint JavaScript file will also incur a performance degradation as a result of this.

    Without detailed debugging, I can't pinpoint the cause of the performance difference. If this is a blocking issue for you, then I would recommend following up with Microsoft Support (http://support.microsoft.com) to have them investigate further. If they find a product issue, we'll look at fixing it in a future version. Hope this helps!

    Thanks

    Justin

    Tuesday, June 3, 2014 11:38 PM

All replies

  • Hi San,

    The performance of PTMergeAndValidatePrintTicket is dependent on the complexity of the driver that it is called against. For example, a driver with no constraints specified in a GPD file will be faster than one with many constraints, and a driver with constraint JavaScript file will also incur a performance degradation as a result of this.

    Without detailed debugging, I can't pinpoint the cause of the performance difference. If this is a blocking issue for you, then I would recommend following up with Microsoft Support (http://support.microsoft.com) to have them investigate further. If they find a product issue, we'll look at fixing it in a future version. Hope this helps!

    Thanks

    Justin

    Tuesday, June 3, 2014 11:38 PM
  • Hi Justin,

    Thanks for your response.  In terms of the number of constraints in GPD file, V3 and V4 is almost same. Just few more constraints are there in V4  GPD file.

    But in V4 I have constraint JS file as V4 Printer driver architecture support this. where I have 4 functionality implemented as per requirement (validatePrintTicket, completePrintCapabilities, convertDevModeToPrintTicket and convertPrintTicketToDevMode). 

    As the presence of JS file in V4 also incur performance degradation then then how do I overcome this problem in my V4 driver? Do I try to profile my JS file for performance improvement.

    Thanks & Regards,

    San

    Wednesday, June 4, 2014 5:56 AM
  • Hi Justin,

    Is there any V4 sample printer driver available in MSDN?

    Thanks & Regards,

    Santanu

    Friday, June 6, 2014 1:09 AM