Beta - Fix issues with very large books
There have been a few reports recently of errors when sending very large books using this driver. The error occurs in the code that is starting the threads to process each internal file. The released version starts one thread for each internal file. This is causing problems with very large books when using the 32bit version of calibre. I am not sure of the exact size of book that will cause a problem, but, the test book I am using has over 5000 internal files.
The attached version of the plugin solves this problem by only starting a smaller number of threads that do the work. At the moment, it is starting up to 100 threads. That should cover most books, but, also prevent larger books from causing issues. There might be some performance impact, but, my testing is inconclusive. The comparisons have been done while other processes have been running that would have affected the time taken. With the large file mentioned, both the released and beta versions are taking between 5 and half and 6 minutes.
Please test this and report any problems. Most of the testing is with the 64bit current release of calibre. I have done very quick tests with the portable versions of 3.48 and 4.23 and it appears to be working with them.
This problem also affects the output plugin for conversions. I have attached a version of this as well if anyone needs it.
Last edited by davidfor; 07-05-2021 at 09:36 PM.
Reason: Removed beta as official versions have been released.
|