Hi, I took a moment to look are your stuff and I am not sure what you are expecting.
Of course your jQuery version will be slower than your native version. I personally think it can reduced tremedously, there is alot of overhead in there for a rather simply application. I can see immediately that you have a high overhead keyboard handler in calcFields(). Now does it mean much? Not sure, how many characters are the users typing - 1 or 2 digits? Did you expect it to be any faster or the same? They are not even doing the same thing. Your jqQuery is doing alot more functionality. The your jQuery calcField() keyboard handler is doing: - a key parser (changeFieldvalue) - a class added or filter (savedStateHandler) - propagates thru each child and child-sibling via jQuery searching/ finding. This is apple and oranges. Obviously it will be slower. Anyway, if you want to profile it, add the following firebug console commands at the beginning and end and you will see where all your overhead is add just with a single keystroke. Add your 10-15 childs and siblings before you run a single keystoke profile: calcFields: function(e) { console.profile(); ..... console.profileEnd(); }, You will be able to see where you can optimize this. -- HLS On Sep 7, 11:38 pm, "Piotr Petrus" <[EMAIL PROTECTED]> wrote: > Hi Charles, > > Thanks for taking your time to investigate my issue > > However, the site you see is not a demo, it's "fully" functional > calculator for css dimensions. :) When you start typing, you fire > different events, and - yes - they affect whole tree & that's > intentional. > > But the thing that only bugs me is adding new nodes. I'll try > optimizing filters more aggresively, but unfortunately I did similar > thing before and it didn't make a difference. > > About other things that you've said: I don't get the JSLint comment; > and my code don't need to be wrapped in closure because it's not a > plugin and it won't be used anywhere else. :) > > -- > Piotr Petrushttp://riddle.pl