Both list and update functions are quiet slow.

Preliminary investigations showed they are not so slow per se, serious lag
is produced by preparation of req object. The format of req object:
http://docs.couchdb.org/en/latest/json-structure.html#request-object

Subjects for optimiztion:

* .info object generation steals 1-2ms even on very powerful machines
* .form object generation and transmission via stdio can also take
significant time, especially taking in account this field is, in fact, a
restructured .body string (read – dupe).

As for .info – I‘d propose to eliminate or simplify it, but it can break
backward compatibility. So if someone has suggestions how it could be
optimized – welcome.

If someone uses .info in real life scenarios – please, comment this post
and tell a story how you use it.

As for .form object, it seems more reasonable to parse .body right inside
Spidermonkey. Moreover, it could be done in lazy manner – using getter
proxy. It means .form property in .req object should be defined as a getter
function, that parses .body only when .form is accessed.

ermouth

Reply via email to