Print Page | Close Window

Using QuickPDF DLL in multiple threads

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: General Discussion
Forum Description: Discussion board for Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3548
Printed Date: 01 May 24 at 10:56PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Using QuickPDF DLL in multiple threads
Posted By: quickpdfdeveloper
Subject: Using QuickPDF DLL in multiple threads
Date Posted: 25 Feb 18 at 8:39PM
Hi,

At the moment I open the same PDF using DAFileOpenReadOnly in 4 separate processes and in each one process different pages from this PDF.

I am trying to switch to using a single process, and to use 4 threads instead. I access the DLL in each thread separately (as the docs say) but performance is dismal compared to the separate processes approach.

Is there any kind of 'global mutex' or similar that could be a choke point for a multithreaded approach?

Thanks.



Replies:
Posted By: kevindebenu
Date Posted: 20 Mar 18 at 9:58AM
Hello quickpdfdeveloper,

A global mutex is used in each function in QPL to access the internal list of QPL instances, but this is only for accessing the instance.

Once the instance has been retrieved from the list there isn't a lock on the actual internal function call.

The slow performance could be caused by the particular functions you're using.

Once you've called DAFileOpenReadOnly, what other QPL functions are you using?

Regards,
Kevin


Posted By: quickpdfdeveloper
Date Posted: 23 Mar 18 at 3:35PM
I use the following functions (here shown in alphabetical order) after unlocking DPL:

da_close_file
da_extract_page_text
da_extract_page_text_blocks
da_find_page
da_get_page_count
da_get_page_height
da_get_text_block_bound
da_get_text_block_char_width
da_get_text_block_count
da_get_text_block_text
da_normalize_page
da_open_file_read_only
da_release_text_blocks
da_set_text_extraction_word_gap
last_error_code

Thanks.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk