Groups | Search | Server Info | Login | Register


Groups > comp.lang.tcl > #55666

Fastest way to run two external processes

From Mark Summerfield <m.n.summerfield@gmail.com>
Newsgroups comp.lang.tcl
Subject Fastest way to run two external processes
Date 2026-04-29 07:38 +0000
Organization A noiseless patient Spider
Message-ID <10sschf$3nvs2$1@dont-email.me> (permalink)

Show all headers | View raw


I need to run two external processes (on Linux):

pdftotext -tsv one.pdf
pdftotext -tsv two.pdf

For each one I need to acquire the output and post-process it.
Both are completely independent.
(However, once I've finished post-processing I then do some work on
both sets of post-processed data together.)

Each external process takes about 3 secs so it takes just over 6 secs
to acquire the data from both processes.

When I've done something similar in Python I've used the multiprocessing
module and this has got my runtime close to the 3 secs.

In my experiments with Tcl's threading I've found the threading startup
overhead to be rather large.

What is the fastest way to run two independent processes concurrently
and acquire their outputs using Tcl?

Back to comp.lang.tcl | Previous | NextNext in thread | Find similar


Thread

Fastest way to run two external processes Mark Summerfield <m.n.summerfield@gmail.com> - 2026-04-29 07:38 +0000
  Re: Fastest way to run two external processes Mark Summerfield <m.n.summerfield@gmail.com> - 2026-04-29 08:51 +0000
    Re: Fastest way to run two external processes meshparts <alexandru.dadalau@meshparts.de> - 2026-04-29 11:24 +0200
      Re: Fastest way to run two external processes Mark Summerfield <m.n.summerfield@gmail.com> - 2026-04-29 09:46 +0000
    Re: Fastest way to run two external processes Ralf Fassel <ralfixx@gmx.de> - 2026-04-29 12:30 +0200
      Re: Fastest way to run two external processes abu <user13892@newsgrouper.org.invalid> - 2026-04-30 00:51 +0000
        Re: Fastest way to run two external processes Ralf Fassel <ralfixx@gmx.de> - 2026-04-30 14:23 +0200
        Re: Fastest way to run two external processes Mark Summerfield <m.n.summerfield@gmail.com> - 2026-05-01 07:04 +0000
          Re: Fastest way to run two external processes Ralf Fassel <ralfixx@gmx.de> - 2026-05-01 22:54 +0200
            Re: Fastest way to run two external processes Mark Summerfield <m.n.summerfield@gmail.com> - 2026-05-02 06:57 +0000
              Re: Fastest way to run two external processes Ashok <apnmbx-public@yahoo.com> - 2026-05-09 16:03 +0530
                Re: Fastest way to run two external processes Ralf Fassel <ralfixx@gmx.de> - 2026-05-11 11:08 +0200
                Re: Fastest way to run two external processes Mark Summerfield <m.n.summerfield@gmail.com> - 2026-05-12 08:40 +0000
                Re: Fastest way to run two external processes Ralf Fassel <ralfixx@gmx.de> - 2026-05-12 16:58 +0200
                Re: Fastest way to run two external processes Mark Summerfield <m.n.summerfield@gmail.com> - 2026-05-13 08:54 +0000
  Re: Fastest way to run two external processes Olivier <user1108@newsgrouper.org.invalid> - 2026-05-01 10:06 +0000
  Re: Fastest way to run two external processes Emiliano <emiliano@example.invalid> - 2026-05-02 00:34 -0300

csiph-web