<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:39:00 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-1225] Performance issues with 2.0 beta driver</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1225</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;I am noticing high CPU usage when I put some load against my API, doing some profiling I can see that the costliest part and the bit causing the issue is the high cost of all the EvaluateSubtree calls in the SubtreeEvaluator.&lt;/p&gt;

&lt;p&gt;I am seeing these issues using the latest 2.0 beta driver.&lt;/p&gt;</description>
                <environment></environment>
        <key id="192342">CSHARP-1225</key>
            <summary>Performance issues with 2.0 beta driver</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="craig.wilson@mongodb.com">Craig Wilson</assignee>
                                    <reporter username="stefan.sedich">Stefan</reporter>
                        <labels>
                            <label>question</label>
                    </labels>
                <created>Thu, 26 Mar 2015 23:08:56 +0000</created>
                <updated>Fri, 5 Apr 2019 13:57:59 +0000</updated>
                            <resolved>Fri, 8 May 2015 13:07:49 +0000</resolved>
                                    <version>2.0</version>
                                    <fixVersion>2.1</fixVersion>
                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="908572" author="craiggwilson" created="Fri, 8 May 2015 13:09:28 +0000"  >&lt;p&gt;Stefan,&lt;/p&gt;

&lt;p&gt;I&apos;ve pushed an update (thanks Ian) to speed up partial evaluation. I couldn&apos;t find a way to speed up LINQ in general other than pre-compiling and caching. &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-1267&quot; title=&quot;Support Compiled Queries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-1267&quot;&gt;CSHARP-1267&lt;/a&gt; is going to be used to track that. Therefore, I went ahead and closed this ticket.&lt;/p&gt;

&lt;p&gt;Craig&lt;/p&gt;</comment>
                            <comment id="908569" author="xgen-internal-githook" created="Fri, 8 May 2015 13:07:17 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;craiggwilson&apos;, u&apos;name&apos;: u&apos;Craig Wilson&apos;, u&apos;email&apos;: u&apos;craiggwilson@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-1225&quot; title=&quot;Performance issues with 2.0 beta driver&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-1225&quot;&gt;&lt;del&gt;CSHARP-1225&lt;/del&gt;&lt;/a&gt;: optimized client-side evaluation of local captures and method calls.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/4fa432a824ddcdd95bc812da0a572e60c352fbf2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/4fa432a824ddcdd95bc812da0a572e60c352fbf2&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="905978" author="craiggwilson" created="Tue, 5 May 2015 23:35:58 +0000"  >&lt;p&gt;No... In fact, I&apos;m quite sure it has nothing to do with aggregation. The second numbers above were without roundtripping with the server. In fact, it seems to also have nothing to do with partial evaluation either as the samples I measured with had no need for partial evaluation. LINQ is simply a slower animal. That&apos;s why Entity Framework offers ways of doing compiled queries (&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/vstudio/bb896297%28v=vs.100%29.aspx&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://msdn.microsoft.com/en-us/library/vstudio/bb896297%28v=vs.100%29.aspx&lt;/a&gt;).  It&apos;s one of the things I&apos;m working on figuring out. I&apos;ve created &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-1267&quot; title=&quot;Support Compiled Queries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-1267&quot;&gt;CSHARP-1267&lt;/a&gt; to track that although I&apos;ve already been working on it.&lt;/p&gt;</comment>
                            <comment id="905977" author="stefan.sedich" created="Tue, 5 May 2015 23:30:27 +0000"  >&lt;p&gt;Thanks Craig,&lt;/p&gt;

&lt;p&gt;It is good to know I was not crazy &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;! do you have any ideas why LINQ might be so bad? is it because it is using aggregation underneath? &lt;/p&gt;



&lt;p&gt;Thanks&lt;br/&gt;
Stefan&lt;/p&gt;</comment>
                            <comment id="905267" author="craiggwilson" created="Tue, 5 May 2015 13:49:13 +0000"  >&lt;p&gt;Hi Stefan,&lt;/p&gt;

&lt;p&gt;I can absolutely reproduce what you are seeing. I wrote a simple testing application as well. While it is running the fullstack and not measure just the individual piece about taking an expression and turning it into a query, it is inline with how an application might function. My results are that there is a large difference between Linq and the other 2 methods, which are fairly close.&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;Builder:           10000 / 2485ms = 4024.14486921529/s&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;Expression Method: 10000 / 2689ms = 3718.85459278542/s&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;Linq:              10000 / 8988ms = 1112.5945705385/s&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;In addition, when not including the roundtrip with the server and solely working client side rendering the queries, the numbers are still somewhat inline with the above results.&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;Builder:           100000 / 1287ms = 77700.0777000777/s&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;Expression Method: 100000 / 2278ms = 43898.1562774363/s&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;Linq:              100000 / 6874ms = 14547.5705557172/s&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;What this tells me is that the network (even localhost) is a major factor in how fast your application runs. Deciding between builders and the expression methods are so close that it&apos;s not worth it when you aren&apos;t pushing massive amounts of data across the network. Indeed, even when using linq, if you aren&apos;t going for massive throughput, the network simply consumes the largest amount of time.&lt;/p&gt;

&lt;p&gt;However, I&apos;m going to look at Ian&apos;s attached work and see if I can make these numbers better. But the take away is that using expressions at runtime is expensive. While it&apos;s nice for readability, it is not the most performant. If you need raw throughput, you&apos;ll likely be better staying away from expressions altogether and use a BsonDocument.&lt;/p&gt;

&lt;p&gt;None of this should be a surprise. Regardless, I&apos;ll see if we can make these numbers better. I&apos;ll start with Ian&apos;s provided work and see where that gets me.&lt;/p&gt;

&lt;p&gt;Craig&lt;/p&gt;</comment>
                            <comment id="903938" author="stefan.sedich" created="Sun, 3 May 2015 21:45:34 +0000"  >&lt;p&gt;Craig, attached a sample.&lt;/p&gt;

&lt;p&gt;Annoyingly as is usually the case the LINQ version is not running as slow as it was many days ago (my machine is not under the CPU pressure it was on Friday so this might have something to do with it), but it is still behind the builder version, although you can see the aggregate version is the slowest of all. I added some queries timing in there too or you can watch mongostat.&lt;/p&gt;


&lt;p&gt;Cheers&lt;br/&gt;
Stefan&lt;/p&gt;</comment>
                            <comment id="903892" author="craiggwilson" created="Sun, 3 May 2015 13:48:09 +0000"  >&lt;p&gt;Could you provide the code you are using in each case?&lt;/p&gt;

&lt;p&gt;Craig&lt;/p&gt;</comment>
                            <comment id="903853" author="stefan.sedich" created="Sun, 3 May 2015 03:18:13 +0000"  >&lt;p&gt;Craig,&lt;/p&gt;

&lt;p&gt;Not sure on only supporting aggregation, running the same query I am seeing only 4,000 ops a second vs 25,000 when running the normal find query with the builder. That is a concerning decrease in performance for me.&lt;/p&gt;



&lt;p&gt;Cheers&lt;br/&gt;
Stefan&lt;/p&gt;</comment>
                            <comment id="903194" author="craiggwilson" created="Fri, 1 May 2015 15:12:21 +0000"  >&lt;p&gt;Tremenous. Thanks Ian.&lt;/p&gt;</comment>
                            <comment id="903193" author="ian.newson" created="Fri, 1 May 2015 15:11:27 +0000"  >&lt;p&gt;Hi Craig,&lt;/p&gt;

&lt;p&gt;Attached is an example of the expression evaluator I mentioned. There&apos;s a&lt;br/&gt;
very simple example in Program.&lt;/p&gt;

&lt;p&gt;Many thanks,&lt;br/&gt;
Ian&lt;/p&gt;</comment>
                            <comment id="903184" author="craiggwilson" created="Fri, 1 May 2015 14:58:34 +0000"  >&lt;p&gt;Hi Ian,&lt;/p&gt;

&lt;p&gt;Yeah, some code would be a great starting point. Email us dotnet-driver@10gen.com.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Craig&lt;/p&gt;</comment>
                            <comment id="903098" author="ian.newson" created="Fri, 1 May 2015 13:30:11 +0000"  >&lt;p&gt;Regarding the original speed issues, I wrote a LINQ provider a few years ago and noticed definite speed issues when compiling expressions, so I ended up writing a custom expression evaluator. It attempts to resolve all parts of the expression without using compilation by using reflection alone, and falls back to .Compile for complicated or unsupported expressions, which aren&apos;t the majority of expressions I find.&lt;/p&gt;

&lt;p&gt;I can share some code if you&apos;re interested?&lt;/p&gt;</comment>
                            <comment id="903015" author="craiggwilson" created="Fri, 1 May 2015 11:00:08 +0000"  >&lt;p&gt;Yeah. Currently, we are only targeting the aggregation framework. It is a much more natural translation than find.  What are your thoughts on not supporting find and only targeting the aggregation framework?&lt;/p&gt;</comment>
                            <comment id="902862" author="stefan.sedich" created="Fri, 1 May 2015 03:08:16 +0000"  >&lt;p&gt;Ah interesting when using AsQueryable() everything runs as an aggregation query? did not expect that.&lt;/p&gt;</comment>
                            <comment id="902817" author="stefan.sedich" created="Fri, 1 May 2015 01:33:54 +0000"  >&lt;p&gt;I grabbed the latest code from github and trying out that driver to see if anything has been fixed interestingly if I use the queryable provider again not that is if back &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;:&lt;/p&gt;

&lt;p&gt;collection.AsQueryable().FirstOrDefault(x =&amp;gt; x.CustomerId == id);&lt;/p&gt;

&lt;p&gt;mongostat shows it as commands and not queries, and showing around 4k/s there, anything obvious I am not doing?&lt;/p&gt;
</comment>
                            <comment id="902791" author="stefan.sedich" created="Fri, 1 May 2015 00:26:51 +0000"  >&lt;p&gt;Just a followup on this one Craig,&lt;/p&gt;

&lt;p&gt;running the following query against mongo and looking at mongostat in a 8 thread test harness and seeing around 11.000 reads a second&lt;/p&gt;

&lt;p&gt;await collection.Find(x =&amp;gt; x.CustomerId == id).FirstOrDefaultAsync();&lt;/p&gt;


&lt;p&gt;If I change this to use the builder I get over 25,000 reads a second, huge increase in performance so there is definitely something up here:&lt;/p&gt;

&lt;p&gt;await collection.Find(Builders&amp;lt;Collection&amp;gt;.Filter.Eq(x =&amp;gt; x.CustomerId, id)).FirstOrDefaultAsync();&lt;/p&gt;



&lt;p&gt;Thanks&lt;br/&gt;
Stefan&lt;/p&gt;</comment>
                            <comment id="865652" author="stefan.sedich" created="Thu, 26 Mar 2015 23:46:32 +0000"  >&lt;p&gt;Great thanks Craig, has been hard to keep up with the new API &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;, I will try that and see how I go.&lt;/p&gt;</comment>
                            <comment id="865651" author="craiggwilson" created="Thu, 26 Mar 2015 23:45:13 +0000"  >&lt;p&gt;IIRC, the PartialEvaluator has always been a CPU hog. I&apos;ll take a closer look at it and see if there is anything we can do. Its purpose is to turn variables and client-side evaluatable functions into constants. That requires that a compilation and evaluation occur.&lt;/p&gt;

&lt;p&gt;Anywyas, I&apos;ll see what I can do.&lt;/p&gt;

&lt;p&gt;BTW: You don&apos;t have to lose type safety during this workaround. You can use the &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;   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;Builders&amp;lt;Customer&amp;gt;.Filter.Eq(x =&amp;gt; x.MasterApiKey, apiKey)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt; helper. This path does not go through the evaluator.&lt;/p&gt;</comment>
                            <comment id="865647" author="stefan.sedich" created="Thu, 26 Mar 2015 23:41:44 +0000"  >&lt;p&gt;Sorry Craig I copied that code from an old snip I had yesterday, I actually upgraded yesterday and yeah using the new way to use the object filter, I tried that to just see if it made any difference.&lt;/p&gt;



&lt;p&gt;Thanks&lt;/p&gt;</comment>
                            <comment id="865645" author="craiggwilson" created="Thu, 26 Mar 2015 23:40:00 +0000"  >&lt;p&gt;Stefan, what version of the driver are you using? We removed the ability to use an anonymous type as a filter in rc0 I believe.  (you can still do it, it just takes a little more work).&lt;/p&gt;</comment>
                            <comment id="865599" author="stefan.sedich" created="Thu, 26 Mar 2015 23:21:08 +0000"  >&lt;p&gt;Hi Craig,&lt;/p&gt;

&lt;p&gt;The query is pretty basic, a single call to the API for this test just loads the current customer,if I run this using the LINQ version I see CPU hit 80% with evaluation being a clear hot spot.&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 customer = await database.Collection&amp;lt;Customer&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;                .Find(x =&amp;gt; x.MasterApiKey == apiKey)&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;                .FirstOrDefaultAsync();&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;I change this to an object search using:&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 customer = await database.Collection&amp;lt;Customer&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;                .Find(new { masterApiKey = apiKey })&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;                .FirstOrDefaultAsync()&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;I can see an over all reduction in CPU and also a fairly large increase in the requests/second I can process. Think I might need to dig into it further, just sharing my initial findings to see if anyone has experienced similar.&lt;/p&gt;



&lt;p&gt;Thanks&lt;br/&gt;
Stefan&lt;/p&gt;
</comment>
                            <comment id="865594" author="craiggwilson" created="Thu, 26 Mar 2015 23:13:53 +0000"  >&lt;p&gt;Hi Stefan,&lt;/p&gt;

&lt;p&gt;That&apos;s interesting. This is the same evaluator we&apos;ve been using for years now. Have you used the 1.x series of the driver and did you see this same behavior?  Perhaps some code could be shared to better let us get a handle on what types of expressions you are using.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Craig&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="202278">CSHARP-1267</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="72582" name="ExpressionEvaluatorExample.zip" size="16132" author="ian.newson" created="Fri, 1 May 2015 15:11:27 +0000"/>
                            <attachment id="72689" name="MongoTest.zip" size="1050799" author="stefan.sedich" created="Sun, 3 May 2015 21:44:08 +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|hs7j53:</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>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="506">C# Sprint 19</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>