Got into a mental exhaustion state last night. Decided to go out to Starbucks with Shane instead of pushing at the code. As has become normal for him, he wanted to play poker.
We each won one game (that is, took all the chips in multiple hands). My win was rather fast, I just played fast, loose and high-stakes and chance delivered a victory. Shane's win was excruciatingly slow. I played fast and loose until I'd lost all save 20 chips but then switched to tight and conservative playing. It probably took him more than an hour to get those 20 chips (we don't raise the ante as we go). I had a natural 4-of-a-kind (i.e. I drew two fours and two fours showed up), a couple of flushes, and various other assorted unlikely hands. If I'd been dealing I'd have been a bit suspicious that I was cheating.
Anyway, we headed home around midnight, and having had a very large caffeinated beverage I was wired for sound. So, got some PyDispatcher hacking done that has been pending all week, then sat down and thought about how to make Cinemon scale up (I want to improve performance on current hardware by a factor of 3).
Which lead to a lot of false starts "I should use a shared-memory mechanism... how complex is that... hmm... alright, an RPC system... no, a dispatcher-routing system..." for half an hour. Then I realised that there was something simple I could do. I could spread out the queries across a large number of UDP ports and let the OS-level queues store incoming messages instead of having the Twisted-level code read the queue as fast as possible and generate delayed calls to deal with the results.
That's nowhere near a 3x speedup, but it does appear to have stabilised and improved web-site response times, which is almost as useful. A bit more hacking on that today to remove the processing-delaying code and see if that helps overall performance.


Comments
2010-07-25 14:02
> and would have no Trac integ ration The trac-bzr plugin[ 1] seems to provide good integ ration between bzr and t [...]
2010-07-13 21:47
I've always been fascinated wi th the Asterisk AMI interface. So much so that I married tha t fascination with the [...]
2010-07-03 21:32
Yes, only references in dicti onaries are replaced, so hold ing references in lists, tuple s, etceteras keeps them alive.
2010-07-03 11:18
They hold references to remove and install?
2010-06-24 08:34
There's higher-level objects w hich are tracking what is repl aced (the actual Mock objects) . They hold references [...]
2010-06-24 08:23
I haven't tried it, but it see ms to me like this approach ha s one fundamental problem: If you replace all refs o [...]
2010-06-24 08:22
That's the "magic" that made m e go "ooh shiny"
2010-06-24 06:03
That's even more evil than the mock patch decorator...
2010-06-06 18:33
blush Oh.
2010-06-06 11:07
That's what the module does (a utomatically), but on a per-te st-run basis, and only for the process being tested (i [...]
2010-06-06 02:43
Maybe I'm missing something im portant here, but why not just write small scripts to mimic whatever dangerous utili [...]
2010-06-05 15:17
I thought about stubbing out t he python call to the process in the current process, but I want something which stu [...]
2010-06-05 14:47
Hmm... if Mock isn't flexibl e enough to handle mocking pro cesses adequately then I'd lik e to know how it could b [...]
2010-05-19 10:27
Hey, maybe it's a stupid new bie question, but where and ho w exactly should the patching of the core take place? [...]
2010-05-04 14:36
I used Qemu and VirtualBox pre tty extensively back when I wa s working for the OLPC, but mo st of the stuff we were [...]