On 1/18/06, Beau Hartshorne <[EMAIL PROTECTED]> wrote:
I'm going to do some performance testing today with synthetic events.
It probably makes sense to return an Event object that can use
functions to find all of these values instead of pre-calculating
everything and discarding what's not needed.

I would like to see your results of this.  I'd be curious to see how much overhead calling a function is as opposed to just running a block of quick comparisons as I do.  If you have time, you might want to take a look at memory overhead as well (and make sure you set up a prototyped object to cut down on function duplication.  If only we could explicitely pass those by reference...)

In your code, this is incorrect, layerX and offsetX are not equivalent:
result.offsetX = evnt.layerX || evnt.offsetX;
result.offsetY = evnt.layerY || evnt.offsetY;

See:
https://bugzilla.mozilla.org/show_bug.cgi?id=122665#c3

Ah, this is good to know.  I was working mainly off the research that Peter-Paul Koch was doing (both on quirksmode and other publications). 

As a side note, I'll take a look at your signal.js in the next day or so once I get some extra time.
--
-Ian MacLeod

Reply via email to