Setting things up for using parallel STL C++17

Pavel Sanda sanda at lyx.org
Wed Aug 31 10:32:18 UTC 2022


On Tue, Aug 30, 2022 at 09:36:42PM -0400, Scott Kostyshak wrote:
> > > Does anyone know of any candidates in LyX's code for using such
> > > parallelization? 
> > 
> > - As written in another thread if you can get parallel graphics conversions
> >   for document load and export, that would be cool.
> 
> This indeed seems like a good candidate since likely the current
> sequential code can't be sped up much. Can someone tell me where in the
> code the parallelization should take place? Perhaps the while loop
> inside LoaderQueue::loadNext() ?

Long time ago I was trying double speedup (had 2 cores) by adding
second process in ForkedCalls.cpp::callNext, but it was not working
correctly and I never get to debug it. But you are right that LoaderQueue
needs to be changed, probably by adding additional consumer(s).

> By the way, I've sometimes wanted a more aggressive graphics loader. I
> think it's pretty impressive how it currently works and converts things
> on-the-fly with scrolling, but I would like to be able to say "don't
> wait for me to scroll, just start converting after I open the .lyx
> file". I know that would involve a lot of wasted cycles, but sometimes I
> would prefer that.

The same here. If you come up with lfun to load up everything in background
that would be useful.

Pavel


More information about the lyx-devel mailing list