Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > General Discussion
  New Posts New Posts RSS Feed - Using QuickPDF DLL in multiple threads
  FAQ FAQ  Forum Search   Register Register  Login Login

Using QuickPDF DLL in multiple threads

 Post Reply Post Reply
Author
Message
quickpdfdeveloper View Drop Down
Team Player
Team Player


Joined: 19 Mar 17
Status: Offline
Points: 32
Post Options Post Options   Thanks (0) Thanks(0)   Quote quickpdfdeveloper Quote  Post ReplyReply Direct Link To This Post Topic: Using QuickPDF DLL in multiple threads
    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.
Back to Top
kevindebenu View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 16 Apr 12
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote kevindebenu Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
quickpdfdeveloper View Drop Down
Team Player
Team Player


Joined: 19 Mar 17
Status: Offline
Points: 32
Post Options Post Options   Thanks (0) Thanks(0)   Quote quickpdfdeveloper Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store