Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #41259
| From | Janis Papanagnou <janis_papanagnou+ng@hotmail.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: How to read an identified part of a huge text file? |
| Date | 2023-04-02 20:05 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <u0cg5b$2jgjp$1@dont-email.me> (permalink) |
| References | <u0c19l$2hc4f$1@dont-email.me> <slrnu2j5fn.2bs.jon+usenet@raven.unequivocal.eu> |
Thanks for your hints and insights thus far!
On 02.04.2023 16:49, Jon Ribbens wrote:
> On 2023-04-02, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
>> My data file is actually structured as <key> <TAB> <text-data> lines
>> The second question is whether it is possible to find the <key>s given
>> a text-match (a string match or ideally a regular expression match) on
>> the respective <text-data> on the external file?
>
> Yes? I'm not sure I understand that question.
Where my first question was (informally described) by something like
Select <text-data> From <text-file> Where <key> Equals <search-key>
the second one operates on the data and returns text-data matching keys
that identify the data records like
Select <keys> From <text-file> Where <text-data> Matches <s1> And <s2>
with a possibility to either get all the s1/s2-matching key-identifier
in one returned set or which lets me sequentially get these keys or
let me operate on matching records (that are identified by the keys of
matching records).
Basically in both questions I have want access (line-wise, record-wise)
to the data, either the <text-data> selected by <key> or the <keys>
where the <text-data> match a search criterion.
The point is; once data is read into memory accessible to JS I can do
everything (including matching), but the problem is the bottleneck due
to the mass of data in the file, so I need to preselect the desired
records (to not have to load it completely into memory).
(I hope it got cleared and doesn't muddy it further.)
The suggestion of using await fetch('myfile.txt') sounds like it's
a raw (byte-oriented) data function (not line/record oriented one),
but I will be looking into that as well. Thanks again.
Janis
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to read an identified part of a huge text file? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2023-04-02 15:51 +0200
Re: How to read an identified part of a huge text file? Jon Ribbens <jon+usenet@unequivocal.eu> - 2023-04-02 14:49 +0000
Re: How to read an identified part of a huge text file? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2023-04-02 20:05 +0200
Re: How to read an identified part of a huge text file? Jon Ribbens <jon+usenet@unequivocal.eu> - 2023-04-02 19:58 +0000
Re: How to read an identified part of a huge text file? JJ <jj4public@outlook.com> - 2023-04-03 06:08 +0700
Re: How to read an identified part of a huge text file? V <vvvvvvvvvvvvvvvvvvvv11111@mail.ee> - 2023-04-03 06:55 -0700
Re: How to read an identified part of a huge text file? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2023-04-04 17:59 -0700
csiph-web