Re: hash table usage questions
- From: sln@xxxxxxxxxxxxxxx
- Date: Wed, 31 Dec 2008 19:23:21 GMT
On Tue, 30 Dec 2008 10:56:04 -0800 (PST), "freesoft12@xxxxxxxxx" <freesoft12@xxxxxxxxx> wrote:
I'm pretty sure I asked the question.
Here are the answers to the questions that Tim, Ted had asked:
My Perl project description:
1) I get thousands of files (lets call them: TFILES) from a C++
program
There is no such thing as a C++ program. There are only programs
written in C++ (or other languages).
that prints out all the files, being opened by the program
over a period of time, to a log.
The executable in question prints out entire files to a log file?
What files are they, and where do they come from? Over and over again
huh? And they are .c or .cc or .cpp files to boot. Thousands of times
over and over and over and over again huh? What about the file names,
same thing.. thousands and thousands of times over and over again?
Hence there are several TFILES thatThousands and thousands of times, over and over again...
are opened many times.
2) My Perl script analyzes the TFILEs and collects & publishes variousYou havn't got a script, thats why you post here. You never have a script,
statistics about each of the TFILEs.
thats why you post here. Its pretty clear why you post here...
Now your publishing statistics.
3) the user can specify one or more filters (containing one or moreSo the user can specify regular expression filters to parse said thousands
regular expressions) so that they can see the statistics about a
subset of TFILES (say, just *.cc and *.cpp files).
and thousands of said published statistics of said thousands and thousands
of said file's opened by a C++ program. Say like *.c or *.cc or *.cpp or *.cxx..
Not too regy expressionist.
4) the filters can be specified in the foll 3 ways:You really can't pass in regular expressions from the command line.
a) on the command line
- All filters are specified on the command line. Hence, I can
populate the hash table with just the TFILEs that match the filter(s)
For reasons I won't go into, its extremely limited and virtually useless.
The mechanics for such uselessness far outweights the uselessness itself.
b) interactively, from a Perl-Tk GUI
Perhaps you should do a native program with real controls using C++.
- For this case, I need to read in all the TFILEs into theBut, how do you get all those published statistics for thousands and
hash table and show the TFILEs to the user in the GUI. The user then
enters the regular expressions to create a filter file. I apply the
filter file and remove the filtered-out TFILEs from the hash table and
show the reduced hash table to the user again in the GUI.
thousands of files, over and over and over.
My Question: My results show that there is quite some time spent inGenerally, there is no blocking in the control. If you have thousands
copying the keys in the hash to the Perl-Tk GUI (once for creating the
filters) and then again, to show the filtered results.
and thousands and thousands to populate a list control with, perhaps
a timer will help to populate it with, and/or use messages.
Regards
John
As a long, long, long time C programmer, I notice your focus is on C
source files. Statistically speaking, there are only a few categories
that your intentions fall into. One is Source Control type. If not
actually trying to implement a flavor of your own..., then trying to gleen
results from existing output, possibly a command line version with its own
script language, that spits out reems and reems of data and statistics.
The other is, your just plain nuts.
Its not good enough to spew buzzwords and hypotheticals and expect
thought to be applied, on your behalf, without respect #1 and humility #2.
sln
.
- References:
- hash table usage questions
- From: freesoft12@xxxxxxxxx
- Re: hash table usage questions
- From: Tim Greer
- Re: hash table usage questions
- From: freesoft12@xxxxxxxxx
- hash table usage questions
- Prev by Date: DateTime and Thread::Running conflict
- Next by Date: Re: hash table usage questions
- Previous by thread: Re: hash table usage questions
- Next by thread: Re: hash table usage questions
- Index(es):
Relevant Pages
|