You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Filipe Manana (JIRA)" <ji...@apache.org> on 2011/02/07 09:07:30 UTC
[jira] Created: (COUCHDB-1061) More efficient
_changes?include_docs=true
More efficient _changes?include_docs=true
-----------------------------------------
Key: COUCHDB-1061
URL: https://issues.apache.org/jira/browse/COUCHDB-1061
Project: CouchDB
Issue Type: Improvement
Reporter: Filipe Manana
Assignee: Filipe Manana
Fix For: 1.0.3, 1.1, 1.2
When using the changes stream with the option include_docs set to true, after having the #doc_info record of a document, we open the document by its ID instead of using the #doc_info record. This is not optimal since opening the doc by its ID implies traversing the by-id B-Tree to find a #full_doc_info record and to finally convert it into a #doc_info record.
The following patch fixes this.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (COUCHDB-1061) More efficient
_changes?include_docs=true
Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Filipe Manana updated COUCHDB-1061:
-----------------------------------
Attachment: COUCHDB-1061-2.patch
Adam,
Right, I totally forgot to look into the _all_docs case, which suffers the same problem.
This 2nd patch also addresses it.
I'm not the most familiar with the view folding code, but I think this is quite minimalistic and all tests pass
> More efficient _changes?include_docs=true
> -----------------------------------------
>
> Key: COUCHDB-1061
> URL: https://issues.apache.org/jira/browse/COUCHDB-1061
> Project: CouchDB
> Issue Type: Improvement
> Reporter: Filipe Manana
> Assignee: Filipe Manana
> Fix For: 1.0.3, 1.1, 1.2
>
> Attachments: COUCHDB-1061-2.patch, COUCHDB-1061.patch
>
>
> When using the changes stream with the option include_docs set to true, after having the #doc_info record of a document, we open the document by its ID instead of using the #doc_info record. This is not optimal since opening the doc by its ID implies traversing the by-id B-Tree to find a #full_doc_info record and to finally convert it into a #doc_info record.
> The following patch fixes this.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (COUCHDB-1061) More efficient
_changes?include_docs=true
Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Filipe Manana updated COUCHDB-1061:
-----------------------------------
Attachment: COUCHDB-1061.patch
> More efficient _changes?include_docs=true
> -----------------------------------------
>
> Key: COUCHDB-1061
> URL: https://issues.apache.org/jira/browse/COUCHDB-1061
> Project: CouchDB
> Issue Type: Improvement
> Reporter: Filipe Manana
> Assignee: Filipe Manana
> Fix For: 1.0.3, 1.1, 1.2
>
> Attachments: COUCHDB-1061.patch
>
>
> When using the changes stream with the option include_docs set to true, after having the #doc_info record of a document, we open the document by its ID instead of using the #doc_info record. This is not optimal since opening the doc by its ID implies traversing the by-id B-Tree to find a #full_doc_info record and to finally convert it into a #doc_info record.
> The following patch fixes this.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (COUCHDB-1061) More efficient
_changes?include_docs=true
Posted by "Adam Kocoloski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991460#comment-12991460 ]
Adam Kocoloski commented on COUCHDB-1061:
-----------------------------------------
Thanks Filipe, this optimization has been on my TODO list for too long. The same technique can be applied to _all_docs?include_docs=true for what it's worth.
> More efficient _changes?include_docs=true
> -----------------------------------------
>
> Key: COUCHDB-1061
> URL: https://issues.apache.org/jira/browse/COUCHDB-1061
> Project: CouchDB
> Issue Type: Improvement
> Reporter: Filipe Manana
> Assignee: Filipe Manana
> Fix For: 1.0.3, 1.1, 1.2
>
> Attachments: COUCHDB-1061.patch
>
>
> When using the changes stream with the option include_docs set to true, after having the #doc_info record of a document, we open the document by its ID instead of using the #doc_info record. This is not optimal since opening the doc by its ID implies traversing the by-id B-Tree to find a #full_doc_info record and to finally convert it into a #doc_info record.
> The following patch fixes this.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (COUCHDB-1061) More efficient
_changes?include_docs=true and _all_docs?include_docs=true
Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Filipe Manana updated COUCHDB-1061:
-----------------------------------
Summary: More efficient _changes?include_docs=true and _all_docs?include_docs=true (was: More efficient _changes?include_docs=true)
> More efficient _changes?include_docs=true and _all_docs?include_docs=true
> -------------------------------------------------------------------------
>
> Key: COUCHDB-1061
> URL: https://issues.apache.org/jira/browse/COUCHDB-1061
> Project: CouchDB
> Issue Type: Improvement
> Reporter: Filipe Manana
> Assignee: Filipe Manana
> Fix For: 1.0.3, 1.1, 1.2
>
> Attachments: COUCHDB-1061-2.patch, COUCHDB-1061-2.patch, COUCHDB-1061.patch
>
>
> When using the changes stream with the option include_docs set to true, after having the #doc_info record of a document, we open the document by its ID instead of using the #doc_info record. This is not optimal since opening the doc by its ID implies traversing the by-id B-Tree to find a #full_doc_info record and to finally convert it into a #doc_info record.
> The following patch fixes this.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (COUCHDB-1061) More efficient
_changes?include_docs=true
Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Filipe Manana updated COUCHDB-1061:
-----------------------------------
Attachment: COUCHDB-1061-2.patch
> More efficient _changes?include_docs=true
> -----------------------------------------
>
> Key: COUCHDB-1061
> URL: https://issues.apache.org/jira/browse/COUCHDB-1061
> Project: CouchDB
> Issue Type: Improvement
> Reporter: Filipe Manana
> Assignee: Filipe Manana
> Fix For: 1.0.3, 1.1, 1.2
>
> Attachments: COUCHDB-1061-2.patch, COUCHDB-1061-2.patch, COUCHDB-1061.patch
>
>
> When using the changes stream with the option include_docs set to true, after having the #doc_info record of a document, we open the document by its ID instead of using the #doc_info record. This is not optimal since opening the doc by its ID implies traversing the by-id B-Tree to find a #full_doc_info record and to finally convert it into a #doc_info record.
> The following patch fixes this.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (COUCHDB-1061) More efficient
_changes?include_docs=true
Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991442#comment-12991442 ]
Paul Joseph Davis commented on COUCHDB-1061:
--------------------------------------------
Good catch. Patch looks good to me.
> More efficient _changes?include_docs=true
> -----------------------------------------
>
> Key: COUCHDB-1061
> URL: https://issues.apache.org/jira/browse/COUCHDB-1061
> Project: CouchDB
> Issue Type: Improvement
> Reporter: Filipe Manana
> Assignee: Filipe Manana
> Fix For: 1.0.3, 1.1, 1.2
>
> Attachments: COUCHDB-1061.patch
>
>
> When using the changes stream with the option include_docs set to true, after having the #doc_info record of a document, we open the document by its ID instead of using the #doc_info record. This is not optimal since opening the doc by its ID implies traversing the by-id B-Tree to find a #full_doc_info record and to finally convert it into a #doc_info record.
> The following patch fixes this.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (COUCHDB-1061) More efficient
_changes?include_docs=true and _all_docs?include_docs=true
Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Filipe Manana resolved COUCHDB-1061.
------------------------------------
Resolution: Fixed
Applied to trunk, 1.1.x and 1.0.x
> More efficient _changes?include_docs=true and _all_docs?include_docs=true
> -------------------------------------------------------------------------
>
> Key: COUCHDB-1061
> URL: https://issues.apache.org/jira/browse/COUCHDB-1061
> Project: CouchDB
> Issue Type: Improvement
> Reporter: Filipe Manana
> Assignee: Filipe Manana
> Fix For: 1.0.3, 1.1, 1.2
>
> Attachments: COUCHDB-1061-2.patch, COUCHDB-1061-2.patch, COUCHDB-1061.patch
>
>
> When using the changes stream with the option include_docs set to true, after having the #doc_info record of a document, we open the document by its ID instead of using the #doc_info record. This is not optimal since opening the doc by its ID implies traversing the by-id B-Tree to find a #full_doc_info record and to finally convert it into a #doc_info record.
> The following patch fixes this.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira