[ 
https://issues.apache.org/jira/browse/COUCHDB-1270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13100499#comment-13100499
 ] 

Paul Joseph Davis commented on COUCHDB-1270:
--------------------------------------------

@Jan,

Actually, now that I look closer at the old code compared to the new code, the 
link/unlink ordering is slightly different because of how the processes are 
managed. Though one thing that's important is that the unlink does come after 
the file:delete which I'll move to be more like the old code.

@Volker

The case indentation is the same as I've always written it. I don't know that 
we've ever dictated anything for it in terms of code guidelines. Though if we 
did, the way I do it is obviously superior. ;)

Good call on the index_dir vs view_index_dir. The original motivation for that 
change was so I could develop the new indexer along side the old indexer 
without colliding. Though now that its generalized to indexes having the view 
in the name seems odd. Perhaps I'll add a function that checks index_dir first 
and then if that's not set uses view_index_dir and prints a deprecation 
warning? And I should also add a couch_index_util:root_dir(ModuleName) that 
creates the subdirectory for each type of indexer automatically. That'd 
probably cleanup some of that code.

For the compaction API change, I'm in favor of deprecating the old and removing 
it after 1.2, but I'm not sure on the details of actually doing that. Add a 
header? Just note it on the wiki after this is merged?

Anyway, I'll get these changes in here in a few minutes.

> Rewrite the view engine
> -----------------------
>
>                 Key: COUCHDB-1270
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1270
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: JavaScript View Server
>            Reporter: Paul Joseph Davis
>         Attachments: 0001-Minor-changes-for-new-indexing-engine.patch, 
> 0002-Create-the-couch_index-application.patch, 
> 0003-Create-the-couch_mrview-application.patch, 
> 0004-Remove-the-old-view-engine.patch
>
>
> The view engine has been creaky and cluttered. As shown by GeoCouch, adding 
> new indexers basically involves copying the entire view engine and hacking 
> the parts that are different. In short, the opposite of good engineering.
> Over the last couple weeks I've refactored the view engine and reimplemented 
> the map/reduce view engine. These changes are 100% internal and no external 
> behavior has changed. Performance is just a tiny bit better than trunk. I did 
> do some playing trying to improve view update times and there are some dances 
> we could do, but for the time being I wanted to keep the same general 
> architecture for updates so that the changes are minimal.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to