Re: Optimization thought, concurrent importing of slides

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




The trick is to make sure that the relevant chunk of import code is thread-safe, which can be quite hard.

I strongly suspect that the reason that MS-Office is fast, is that it only parses the pages on demand, instead
of all at once.

On 2020/10/19 1:16 pm, Mike Kaganski wrote:
Hi,

On 19.10.2020 6:32, 方振华(601661) wrote:
Our two competitors MS Office/WPS do not have the problem of scaling. Opening a document with 100 slides makes little percetible difference from opening a PPT of one single slide. We take a look at the code, and we think, maybe, instead of importing the document slide by slide, would it be possible to import all the slides at once with multiple threads?

Has anyone made such attemp? What stops us from using concurrent processing?

Looks like this is what https://git.libreoffice.org/core/+/8062e88e73acd8d1f9a62b0bd519b499693285e3 recently did for ODF case, it seems?


Here are the code snippet, in oox/source/ppt/presentationfragmenthandler.cxx
void PresentationFragmentHandler::finalizeImport()
{
...
             int nPagesImported = 0;
             for (sal_Int32 elem : aRangeEnumerator)
             {
                 if ( rxStatusIndicator.is() )
                     rxStatusIndicator->setValue((nPagesImported * 10000) / aRangeEnumerator.size());

                 importSlide(elem, !nPagesImported, bImportNotesPages);
                 nPagesImported++;
             }
...
}


_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice



_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux