%hash = 'a'..'j';;
$hashref = \%hash;;
pp $hashref;;
{ a => "b", c => "d", e => "f", g => "h", i => "j" }
$copy = \%{ $hashref };;
pp $copy;;
{ a => "b", c => "d", e => "f", g => "h", i => "j" }
print for $hashref, $copy;;
HASH(0x394aa70)
HASH(0x394aa70)
My reason for questioning it is simply that when someone uses a very obscure noop quite so frequently in their code, it raises alarm bells. Why are they doing this? What were they hoping to achieve by it?
You are using a large number of other, similar NOOP constructs; eg. \@{ $arrayref }, and whole bunch of scalar references (to scalars holding small strings) that don't appear to serve any other purpose than to obfuscate your code.
None of this has any particular performance bearing on the code, but it has made reading and understanding what your code is doing, a lot harder than it ought to be.
The code has also changed somewhat from the code you originally posted -- eg. in the original, your thread procedures were posting great lumps of data to a results queue: $Qresults->enqueue( \%{$result} );
But then nothing is ever read from that queue. That however has disappeared from the code you posted later.
But the big thing I'm having trouble understanding is why you are querying a huge amount of data from one DB, only to create temporary tables in another DB, and then perform a bunch of selects on it.
Why not just create those temporary tables in the original DB and do the selections there?
You are also building up huge volumes of shared data -- much of it duplicated -- and then doing nothing with it.
In general, I'm having a real hard time trying to understand the overall goals of program. It seems to serve no useful purpose other than to use threads and shared data in the worst possible way.
Could you write a textual description of what the goal of this code is?
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
|