Re: Making Paragraph::latex() thread safe?

2022-08-30 Thread Scott Kostyshak
On Tue, Aug 30, 2022 at 03:06:36PM +0200, Kornel Benko wrote: > Am Tue, 30 Aug 2022 08:38:37 -0400 > schrieb Scott Kostyshak : > > > On Tue, Aug 30, 2022 at 01:20:08PM +0200, Kornel Benko wrote: > > > > > > The latex generation part is just neligible. > > > > > > The latex part may help in

Re: Making Paragraph::latex() thread safe?

2022-08-30 Thread Kornel Benko
Am Tue, 30 Aug 2022 08:38:37 -0400 schrieb Scott Kostyshak : > On Tue, Aug 30, 2022 at 01:20:08PM +0200, Kornel Benko wrote: > > > > The latex generation part is just neligible. > > > > The latex part may help in find algorithm though, where is is often called. > > > > Ah that might be a

Re: Making Paragraph::latex() thread safe?

2022-08-30 Thread Scott Kostyshak
On Tue, Aug 30, 2022 at 01:20:08PM +0200, Kornel Benko wrote: > > The latex generation part is just neligible. > > The latex part may help in find algorithm though, where is is often called. Ah that might be a good use case. Is find limited more by LaTeX export or regex or something else? I

Re: Making Paragraph::latex() thread safe?

2022-08-30 Thread Scott Kostyshak
On Tue, Aug 30, 2022 at 12:38:20PM +0200, Jean-Marc Lasgouttes wrote: > Le 30/08/2022 à 12:02, Pavel Sanda a écrit : > > The bottlenecks I typically experience are of two kinds: > > 1) pictures conversion (having parallel code would be great even for > > document load when ton of pics gets

Re: Making Paragraph::latex() thread safe?

2022-08-30 Thread Scott Kostyshak
On Tue, Aug 30, 2022 at 12:02:24PM +0200, Pavel Sanda wrote: > On Mon, Aug 29, 2022 at 03:52:19PM -0400, Scott Kostyshak wrote: > > I think the speedup will be even faster if we could make Paragraph::latex() > > thread-safe. > > Before tuning threads - are you sure that the sequential run can be

Re: Making Paragraph::latex() thread safe?

2022-08-30 Thread Kornel Benko
Am Tue, 30 Aug 2022 12:02:24 +0200 schrieb Pavel Sanda : > On Mon, Aug 29, 2022 at 03:52:19PM -0400, Scott Kostyshak wrote: > > I think the speedup will be even faster if we could make Paragraph::latex() > > thread-safe. > > Before tuning threads - are you sure that the sequential run can be

Re: Making Paragraph::latex() thread safe?

2022-08-30 Thread Jean-Marc Lasgouttes
Le 30/08/2022 à 12:02, Pavel Sanda a écrit : The bottlenecks I typically experience are of two kinds: 1) pictures conversion (having parallel code would be great even for document load when ton of pics gets converted!) Yes, the speed of this is questionable right now. 2) final pdflatex

Re: Making Paragraph::latex() thread safe?

2022-08-30 Thread Pavel Sanda
On Mon, Aug 29, 2022 at 03:52:19PM -0400, Scott Kostyshak wrote: > I think the speedup will be even faster if we could make Paragraph::latex() > thread-safe. Before tuning threads - are you sure that the sequential run can be broken in this way, i.e. whether subsequent paragraphs are not

Re: Making Paragraph::latex() thread safe?

2022-08-29 Thread Scott Kostyshak
On Tue, Aug 30, 2022 at 12:28:58AM +0200, Thibaut Cuvelier wrote: > On Mon, 29 Aug 2022 at 21:52, Scott Kostyshak wrote: > > > I used the hacks just to get an idea of whether such parallelization would > > actually lead to a speed-up. It does. For example, on an 8-core machine, > > the document

Re: Making Paragraph::latex() thread safe?

2022-08-29 Thread Thibaut Cuvelier
On Mon, 29 Aug 2022 at 21:52, Scott Kostyshak wrote: > I used the hacks just to get an idea of whether such parallelization would > actually lead to a speed-up. It does. For example, on an 8-core machine, > the document files (user guide, etc.) export to .tex about 4x faster. This > isn't that

Making Paragraph::latex() thread safe?

2022-08-29 Thread Scott Kostyshak
If you're not curious about the background, skip to the part below starting with "The main problem". In short, I want to learn more about some code to try to make it thread-safe. The last few days I've been experimenting with using parallelization in part of LyX's code. I'm currently using a