dnamonk has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks,
The below program is super slow to process a few GB file. I was thinking to do multi-threading to make it faster. Any clues on how I can do it?
Btw, I am reading and writing a gzip file
Thanks in advance.#!/bin/bash/perl open(FH, $ARGV[0]) || die("Cannot open:"); #open(FH, "gunzip -c $ARGV[0] |") or die "gunzip $ARGV[0]: $!"; while(<FH>){ some regex code }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Multi threading a
by Corion (Patriarch) on Sep 02, 2021 at 20:20 UTC | |
by dnamonk (Acolyte) on Sep 02, 2021 at 22:33 UTC | |
Re: Multi threading a
by choroba (Cardinal) on Sep 02, 2021 at 19:52 UTC | |
by Discipulus (Canon) on Sep 03, 2021 at 07:51 UTC | |
by choroba (Cardinal) on Sep 03, 2021 at 07:55 UTC | |
by karlgoethebier (Abbot) on Sep 03, 2021 at 17:33 UTC | |
Re: Multi threading a
by perlfan (Parson) on Sep 09, 2021 at 00:49 UTC |