<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:36:30 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>[CSHARP-332] read large int array</title>
                <link>https://jira.mongodb.org/browse/CSHARP-332</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Reading/Writing a large number of int values (20-30 k or more) into a BsonArray takes a lot of time. The deserialization is done into a BsonDocument.&lt;/p&gt;</description>
                <environment>Windows 7 x64 bit, mongodb 2.0</environment>
        <key id="22947">CSHARP-332</key>
            <summary>read large int array</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</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="9">Done</resolution>
                                        <assignee username="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="harvy">Andrei Neagu</reporter>
                        <labels>
                            <label>performance</label>
                    </labels>
                <created>Wed, 28 Sep 2011 19:01:12 +0000</created>
                <updated>Thu, 2 Apr 2015 18:28:19 +0000</updated>
                            <resolved>Thu, 29 Sep 2011 04:09:04 +0000</resolved>
                                    <version>1.1</version>
                                    <fixVersion>1.3</fixVersion>
                                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="57569" author="rstam" created="Thu, 29 Sep 2011 14:38:48 +0000"  >&lt;p&gt;See the Google Groups discussion for more information about the implications of creating an index on a very large array element.&lt;/p&gt;</comment>
                            <comment id="57534" author="harvy" created="Thu, 29 Sep 2011 09:36:25 +0000"  >&lt;p&gt;With 60% it should be way better &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; Thanks.&lt;/p&gt;

&lt;p&gt;Please have a look at &lt;a href=&quot;http://groups.google.com/group/mongodb-user/browse_thread/thread/8cdc9d0fed6dfc23&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://groups.google.com/group/mongodb-user/browse_thread/thread/8cdc9d0fed6dfc23&lt;/a&gt; also.&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                            <comment id="57533" author="harvy" created="Thu, 29 Sep 2011 09:34:37 +0000"  >&lt;p&gt;can you have a test with this one? I didn&apos;t mention there is an index on that object.&lt;/p&gt;</comment>
                            <comment id="57482" author="rstam" created="Thu, 29 Sep 2011 04:09:04 +0000"  >&lt;p&gt;Resolved issue for now. Will reopen if further discussion warrants.&lt;/p&gt;</comment>
                            <comment id="57479" author="rstam" created="Thu, 29 Sep 2011 03:50:26 +0000"  >&lt;p&gt;In the BSON specification arrays are stored as pseudo-documents where the elements are named &quot;0&quot;, &quot;1&quot;, etc... The C# driver ignores these names during deserialization, and one quick optimization was to not bother doing the UTF8 decoding of these element names when they were going to be ignored anyway. Making this one small change improved performance by about 60%:&lt;/p&gt;

&lt;p&gt;200 iterations in 00:00:03.1001773&lt;br/&gt;
64.5124393369373 documents/second&lt;br/&gt;
1935373.18010812 integers/second&lt;br/&gt;
Press Enter to continue&lt;/p&gt;

&lt;p&gt;That was the only low hanging fruit though. Does this seem like enough of an improvement to you?&lt;/p&gt;</comment>
                            <comment id="57472" author="rstam" created="Thu, 29 Sep 2011 03:33:23 +0000"  >&lt;p&gt;If I run the test program without the debugger it&apos;s considerably faster:&lt;/p&gt;

&lt;p&gt;200 iterations in 00:00:04.9522832&lt;br/&gt;
40.3854125305273 documents/second&lt;br/&gt;
1211562.37591582 integers/second&lt;br/&gt;
Press Enter to continue&lt;/p&gt;

&lt;p&gt;Note: replaced values with slightly lower numbers. Each run produces different numbers (???) and these values are closer to the median.&lt;/p&gt;</comment>
                            <comment id="57465" author="rstam" created="Thu, 29 Sep 2011 03:03:53 +0000"  >&lt;p&gt;This is the output of the test program on my computer (your numbers will vary):&lt;/p&gt;

&lt;p&gt;200 iterations in 00:00:05.8833365&lt;br/&gt;
33.9943159803965 documents/second&lt;br/&gt;
1019829.4794119 integers/second&lt;br/&gt;
Press Enter to continue&lt;/p&gt;

&lt;p&gt;Note that while 33 documents per second sounds slow, when you look at it as deserializing over 1 million array values per second it doesn&apos;t sound so slow any more.&lt;/p&gt;

&lt;p&gt;Nonetheless, I will run this under a profile and look for possible optimizations.&lt;/p&gt;</comment>
                            <comment id="57463" author="rstam" created="Thu, 29 Sep 2011 03:01:45 +0000"  >&lt;p&gt;I&apos;ve attached the test program I&apos;m using to evaluate performance of reading documents with very large arrays of integers.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="13344" name="Program.cs" size="1696" author="robert@mongodb.com" created="Thu, 29 Sep 2011 03:01:45 +0000"/>
                            <attachment id="13347" name="Program_2.cs" size="1594" author="harvy" created="Thu, 29 Sep 2011 09:34:37 +0000"/>
                    </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|hrh8cf:</customfieldvalue>

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