On 11/23/2010 03:50 AM, g...@catking.net wrote:
> ... elision by patrick ...
> What is the aim here? Unless I've missed the point, it seems like a
> trade-off between computation time for the matrix and memory footprint
> of storing all the possible values that matrix could hold.
> That's fairly bit of memory to grab if there's not a real need. How long
> does it take to calculate matrix each time? Is this even a noticeable
> proportion of the time required to apply the filter to an image?
You're right.  When the image of the plugin is only 7k 
or so, and the dynamically allocated memory for the 
matrix is 1/99th of the size of the static array, in 
comparison it's a fair bit.  The only place we'd care 
about it would be at initial load of the plugin.  It's 
still kb vs mb or gb of an image, so it's not a lot in 
real terms.  The time to calculate the matrix each time 
is not noticeable on any modern computer.  Shoot, 
running it 100 times to make the include file was only 
a few milliseconds.  The only reason I looked at it was 
because someone was talking about it and I wondered 
whether it was wasted time to calculate it each time 
the radius was less than 10.  It filled in time while 
my brain was figuring out a templating problem in the 
background.  It was a fairly meaningless exercise to 
avoid being annoyed at something I _couldn't_ figure 
out just then.  My brain is really content to stay busy 
solving meaningless problems for fun though;)  To 
really know, you'd have to do tests each way to see if 
it really made any difference either way, and I suspect 
it doesn't.  It's certainly not what holds anything up 
in the user's experience of the plugin.  For a few, it 
might make a difference in comprehensibility, but I 
doubt it.  A comment that says what the method 
calculates, vs a similar comment that the table is the 
result of such calculations doesn't seem much of a 
> If I've got the wrong end of the stick, what is the problem with the
> current code?
I like that expression.  Clearly means, "If I'm wrong" 
only longer and more colorful.  I wonder where it came 
from?  I don't think I've heard it before.  Is it from 
a particular region of the world?  Growing up in Texas 
we had a LOT of cool expressions.   What kind of stick 
is it?  What would you do with the right end of the 
stick?  What happens to you if you have the wrong end 
of the stick?   Just what the heck IS the metaphor?  If 
someone is getting beaten the wrong end of the stick 
would be the one hitting you and the right end would be 
the end being held by the person using it, but clearly, 
that's not the metaphor!  If it was, then "If I've got 
the wrong end of the stick" would mean, "If something 
bad is happening to me".  My brain never stops!  lol!

best regards,

Gimp-developer mailing list

Reply via email to