I am still not convinced we need an index. I'd like to see some concrete proof that we're not engaging in "overoptimization" here - is this really a bottleneck for anyone?

Well, I need to get some real work done today, but I will do some benchmarking at some point. It's not like there's a big rush to complete 3.3.0 this week. I do like that Mike's code simplifies a number of the the FS methods. It just looks more elegant.

"More elegant" is the best reason I can think of for refactoring it. Heck, even if my implementation can be proved to be slower than the original, I still like this one better because of sheer code size and readability.

I don't think that you'll notice much of a performance difference, but I like the fact that it:
- You get the same object instance:
assert (form['key'] is form['key'])
- Does not create a file object for every field
- Getting form['key'] a second time is cheap.

--
Mike Looijmans
Philips Natlab / Topic Automation

Reply via email to