<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:44:45 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-3230] Improve Serialization</title>
                <link>https://jira.mongodb.org/browse/CSHARP-3230</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;div class=&quot;panel&quot; style=&quot;background-color: #c2d2c2;border-color: #ccc;border-style: dashed;border-width: 1px;&quot;&gt;&lt;div class=&quot;panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-style: dashed;border-bottom-color: #ccc;background-color: #239eb0;&quot;&gt;&lt;b&gt;Epic Summary&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;panelContent&quot; style=&quot;background-color: #c2d2c2;&quot;&gt;
&lt;p&gt;&lt;b&gt;Summary&lt;/b&gt;&lt;br/&gt;
1) Assess all our currently open serialization items &lt;br/&gt;
2) Close out old, gone away, or won&apos;t fix items&lt;br/&gt;
3) Create a rollup of the seralization asks that we will/should fix and attach them to this epic&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Motivation&lt;/b&gt;&lt;br/&gt;
We have many users who have opened serialization bugs or feature requests over the years, and our backlog has grown fairly unwieldy as a result. Some of these asks are reasonable and some are not, and we need to dedicate a few weeks to reviewing them all and decisioning each ticket.&lt;/p&gt;


&lt;h4&gt;&lt;a name=&quot;CastofCharacters&quot;&gt;&lt;/a&gt;Cast of Characters&lt;/h4&gt;
&lt;p&gt;Engineering Lead: James Kovacs&lt;br/&gt;
Product Owner: Rachelle Palmer&lt;br/&gt;
Program Manager: &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=esha.bhargava&quot; class=&quot;user-hover&quot; rel=&quot;esha.bhargava&quot;&gt;esha.bhargava&lt;/a&gt;&lt;/p&gt;


&lt;h4&gt;&lt;a name=&quot;Documentation&quot;&gt;&lt;/a&gt;Documentation&lt;/h4&gt;
&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;Scope Document|some.url&amp;#93;&lt;/span&gt;&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;Technical Design Document|some.url&amp;#93;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="1522553">CSHARP-3230</key>
            <summary>Improve Serialization</summary>
                <type id="11" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14707&amp;avatarType=issuetype">Epic</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="rachelle.palmer@mongodb.com">Rachelle Palmer</reporter>
                        <labels>
                            <label>rp-track</label>
                            <label>size-large</label>
                    </labels>
                <created>Thu, 22 Oct 2020 15:03:17 +0000</created>
                <updated>Wed, 7 Feb 2024 19:09:29 +0000</updated>
                                                                                                <votes>1</votes>
                                    <watches>8</watches>
                                                                                                                <comments>
                            <comment id="6076263" author="JIRAUSER1277133" created="Wed, 7 Feb 2024 19:09:29 +0000"  >&lt;p&gt;Absolutely!&#160; &#160;I&apos;ll have someone confirm that we were doing a proper comparison and then create a ticket with a sample.&#160; We still have the test data we shared with the consultant and his test app and final report.&#160; &#160;He did reach out to someone in the c# driver group during the session and was told there were some planned improvements to remove reflection in the driver.&#160; &#160;Maybe that is another ticket?&#160; If so, please let me know so we can watch for that as well.&lt;/p&gt;

&lt;p&gt;My mongo dev is out sick today, but will get on this soon.&lt;/p&gt;</comment>
                            <comment id="6076188" author="james.kovacs" created="Wed, 7 Feb 2024 18:56:07 +0000"  >&lt;p&gt;Hi, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ddelapasse%40oceaneering.com&quot; class=&quot;user-hover&quot; rel=&quot;ddelapasse@oceaneering.com&quot;&gt;ddelapasse@oceaneering.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thank you for reaching out to us about your concerns around serialization performance in the .NET/C# Driver. We have investigated/prototyped various serialization performance improvements in the past year or two, but they all came with tradeoffs and potentially breaking changes. We would like to better understand your use case so that we can propose meaningful improvements - both in your code and the driver itself. I would suggest you open a support ticket referencing this issue so that we can investigate further together.&lt;/p&gt;

&lt;p&gt;Something I would like to note... You mentioned that you were comparing the deserialization performance of the .NET/C# Driver to &lt;tt&gt;mongosh&lt;/tt&gt;. When using &lt;tt&gt;mongosh&lt;/tt&gt;, a query is executed and an initial 16MB batch is deserialized with additional 16MB batches being fetched and deserialized on demand during iteration. Although you can do the same thing in C# using &lt;tt&gt;query.ToCursor()&lt;/tt&gt;, it is more typical to call &lt;tt&gt;query.ToList()&lt;/tt&gt;, which retrieves and deserializes all documents at once. To ensure that you are comparing apples to apples, I would suggest iterating the entire cursor in &lt;tt&gt;mongosh&lt;/tt&gt; and doing the same in your C# code:&lt;/p&gt;

&lt;p&gt;For &lt;tt&gt;mongosh&lt;/tt&gt;:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;var start = new Date();&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;var cursor = db.coll.aggregate(&amp;lt;&amp;lt;PIPELINE&amp;gt;&amp;gt;);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;cursor.forEach(printjson);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;var end = new Date();&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;console.log((end - start) + &quot;ms&quot;);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;For C#:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;var stopwatch = Stopwatch.StartNew();&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;var query = coll.Aggregate(&amp;lt;&amp;lt;PIPELINE&amp;gt;&amp;gt;);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;var results = query.ToList();&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;stopwatch.Stop();&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;Console.WriteLine($&quot;{stopwatch.ElapsedMilliseconds}ms&quot;);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;By iterating the entire cursor and deserializing all results, this will provide a more representative comparison of &lt;tt&gt;mongosh&lt;/tt&gt; (which uses the Node.js Driver internally) and the .NET/C# Driver.&lt;/p&gt;

&lt;p&gt;Sincerely,&lt;br/&gt;
James&lt;/p&gt;</comment>
                            <comment id="6074779" author="JIRAUSER1277133" created="Wed, 7 Feb 2024 13:32:55 +0000"  >&lt;p&gt;This issue is severely impacting my team&apos;s project.&#160; We just paid $10k for a consultant to help us and the poor performance of the driver&apos;s C# deserialization was found to be the root cause of all of our &quot;pain points&quot;.&#160; I see that many of the epic&apos;s tickets are already closed.&#160; Could you please release what you have in the hopes that it will offer some improvement?&lt;/p&gt;

&lt;p&gt;We&apos;re reducing our projections when possible and minimizing our objects, but still giving us a very disappointing experience when compared to the pure query in the console (ie deserialization is 10x slower than the query itself).&lt;/p&gt;</comment>
                            <comment id="4331275" author="dbeng-pm-bot" created="Wed, 2 Feb 2022 19:03:10 +0000"  >&lt;p&gt;If you are not logged in, you can view the tickets in this epic by following &lt;a href=&quot;https://jira.mongodb.org/issues/?jql=%22Epic%20Link%22%20%3D%20CSHARP-3230&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;this link&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                                        </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_10860" key="com.pyxis.greenhopper.jira:gh-epic-color">
                        <customfieldname>Epic Colour</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ghx-label-2</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10858" key="com.pyxis.greenhopper.jira:gh-epic-label">
                        <customfieldname>Epic Name</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Improve Serialization</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10859" key="com.pyxis.greenhopper.jira:gh-epic-status">
                        <customfieldname>Epic Status</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10640"><![CDATA[To Do]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr6hjb:</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>