<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:47:51 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-4308] Class  and Collection Deserializer Optimization</title>
                <link>https://jira.mongodb.org/browse/CSHARP-4308</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Class deserializer has many work with reflection , excess loop checks, set values to properties produce boxing&lt;/p&gt;

&lt;p&gt;Collection deserialization create excess list instead of return the ready one and again - REFLECTION....&lt;/p&gt;

&lt;p&gt;I solved these problems:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/pull/871&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/pull/871&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;optimized create instance - without reflection&lt;/li&gt;
	&lt;li&gt;optimized set values to properties- without reflection, boxing, interface virtualization impact (for Deserialize Call)&lt;/li&gt;
	&lt;li&gt;optimized collection deserialization- in most cases we can just return prepared List, in some other cases - removed reflection&lt;/li&gt;
	&lt;li&gt;cache IsReadonly&lt;/li&gt;
	&lt;li&gt;dont call SetRequiredFields if required fields does not exists (flag of required fields exist was cached)&lt;/li&gt;
	&lt;li&gt;seporate deserialization of classes with default constructor and classes with creatorMap (to get rid of null checks)&lt;/li&gt;
	&lt;li&gt;add generic BsonMemberMap for some optimizations above&lt;/li&gt;
	&lt;li&gt;fix one test , that used local culture in Parse method and failed&lt;br/&gt;
var expectedResult = decimal.Parse(expectedResultString, CultureInfo.InvariantCulture); &amp;#8211; pass culture here&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Links:&lt;/p&gt;

&lt;p&gt;1) PR: &lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/pull/871&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/pull/871&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2) Test Project: &lt;a href=&quot;https://github.com/troepolik/testMongoDBPerformance&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/troepolik/testMongoDBPerformance&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;just set reference to BSON project, sure you set release mode and run, and press to repeate several times to see statistics, then switch to my optimized project.&#160;&lt;/p&gt;

&lt;p&gt;Sugestion: press repeat in moment when CPU% is low.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2128320">CSHARP-4308</key>
            <summary>Class  and Collection Deserializer Optimization</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</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="3">Duplicate</resolution>
                                        <assignee username="boris.dogadov@mongodb.com">Boris Dogadov</assignee>
                                    <reporter username="aleksei.troepolskii@altenar.com">Aleksei Troepolskii</reporter>
                        <labels>
                    </labels>
                <created>Fri, 2 Sep 2022 13:32:18 +0000</created>
                <updated>Fri, 20 Jan 2023 17:00:54 +0000</updated>
                            <resolved>Mon, 17 Oct 2022 15:22:47 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                    <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2128292">CSHARP-4306</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>CSHARP-3230</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0rjog:</customfieldvalue>

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