couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <jch...@apache.org>
Subject Re: _rewrite handler
Date Mon, 07 Dec 2009 00:47:28 GMT
On Sat, Dec 5, 2009 at 11:37 PM, Roger Binns <rogerb@rogerbinns.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Chris Anderson wrote:
>>> I'm inclined to agree with you. I'm working on a patch to make it so
>>> the show and list funs have access to the entire design document. This
>>> should facilitate what you are asking for.
>
> Would that also have the side effect of not needing the !code macros any
> more since you could just grab other functions directly out of the design doc?
>

yes.

> I had been considering plugging the Google Closure Javascript
> optimizer/recompiler into my couchapp equivalent.  Of particular interest is
> its ability to remove unused code which is typical when using libraries.
>
>  http://code.google.com/closure/compiler/
>
> Also would the design document access be read-only or read-write?
>

Read-only - of course you could add state to the object if you wanted
but it'd be cleared when the os process is restarted, which will
happen from time to time.

The big challenge here is striking the right balance. I'd like to have
the whole ddoc available to the map and reduce functions, but I don't
want to invalidate the indexes every time someone changes a show or or
list. I'll probably end up special-casing the views not to change
invalidation strategies for now.

Chris


> Roger
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAksbX0EACgkQmOOfHg372QQiAgCeMsH2vDffZ0gvN+g8Gru/QkvW
> LnAAoJeOuDuSLV37ysZO/8Ac688ffEYY
> =Q/Os
> -----END PGP SIGNATURE-----
>
>



-- 
Chris Anderson
http://jchrisa.net
http://couch.io

Mime
View raw message