<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:51:50 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[JAVA-245] DBCursor.toArray() should run decodes in thread-pool instead of serially</title>
                <link>https://jira.mongodb.org/browse/JAVA-245</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;By using a thread-pool, or more than just a single thread, the decoding time can be greatly decreased. This means the results will be available to clients in a much shorter time.&lt;/p&gt;

&lt;p&gt;This could also be done for each batch the cursor retrieves; that might be enough to take care of the issue.&lt;/p&gt;</description>
                <environment></environment>
        <key id="14101">JAVA-245</key>
            <summary>DBCursor.toArray() should run decodes in thread-pool instead of serially</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="2">Won&apos;t Fix</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="scotthernandez">Scott Hernandez</reporter>
                        <labels>
                    </labels>
                <created>Tue, 28 Dec 2010 18:58:00 +0000</created>
                <updated>Wed, 21 Sep 2016 21:31:45 +0000</updated>
                            <resolved>Wed, 21 Sep 2016 21:31:45 +0000</resolved>
                                                                    <component>Performance</component>
                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="21898" author="eliot" created="Wed, 29 Dec 2010 04:21:46 +0000"  >&lt;p&gt;I get it, I&apos;ve never seen a driver do something like this, though it makes sense.&lt;br/&gt;
Another option is to use RawDBObject for read only data.&lt;br/&gt;
No up front parsing, but can be slower for other things..&lt;/p&gt;</comment>
                            <comment id="21897" author="scotthernandez" created="Wed, 29 Dec 2010 04:19:10 +0000"  >&lt;p&gt;Right now when doing batch processing of records in java one of the bottlenecks is the time it takes to decode (and encode) to/from bson. By doing this in a thread-pool it seems like throughput would be pushed way up.&lt;/p&gt;

&lt;p&gt;It seems like this is going to the case with any application that wants to reduce the time it takes to get back the results.&lt;/p&gt;

&lt;p&gt;Maybe I&apos;m not explaining things well. If I get the time I can put together a fork with some examples.&lt;/p&gt;</comment>
                            <comment id="21896" author="eliot" created="Wed, 29 Dec 2010 04:09:07 +0000"  >&lt;p&gt;I didn&apos;t mean it wouldn&apos;t have to be in the driver, i mean its a pretty app level type of thing to be in a low level driver.&lt;/p&gt;

&lt;p&gt;I guess as an option i can be ok.&lt;/p&gt;</comment>
                            <comment id="21893" author="scotthernandez" created="Wed, 29 Dec 2010 02:15:22 +0000"  >&lt;p&gt;Yeah, it is should not be the default.&lt;/p&gt;

&lt;p&gt;It really needs to be done in the driver. It needs to happen when the bson is being decoded into java objects. There is no other place but for the driver to do it.&lt;/p&gt;

&lt;p&gt;We could create a holder, like the java.util.concurrent.Future object, so that a factory could be used to do the decoding. The default implementation could just return a synchronous version, giving the same behavior that exists now. We could also provide an async version that runs some of them concurrently in a decoder pool (on multiple threads).&lt;/p&gt;

&lt;p&gt;Part of the issue now is that all decoding is done serially, even when you explicitly state that you don&apos;t want to use an iterator (like in toArray). On a multi-proc machine it would cut down on the total time to generate the list by using more cpu/cores.&lt;/p&gt;</comment>
                            <comment id="21882" author="eliot" created="Tue, 28 Dec 2010 20:18:16 +0000"  >&lt;p&gt;Not sure that&apos;s something that it makes sense for a driver to do.&lt;br/&gt;
Definitely not the default.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrgak7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8620</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>