{"id":112,"date":"2012-06-21T18:17:58","date_gmt":"2012-06-21T14:17:58","guid":{"rendered":"http:\/\/infobs.athn.ru\/?p=112"},"modified":"2012-06-21T18:17:58","modified_gmt":"2012-06-21T14:17:58","slug":"optimizatsiya-linq-zaprosa","status":"publish","type":"post","link":"https:\/\/infobase.athn.ru\/program\/2012\/06\/optimizatsiya-linq-zaprosa\/","title":{"rendered":"\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f LINQ-\u0437\u0430\u043f\u0440\u043e\u0441\u0430"},"content":{"rendered":"<pre>var sw = Stopwatch.StartNew();\n      for (int i = 0; i  new { Id = c.Id, UploadedDate = c.UploadedDate })\n          .Where(c =&gt; c.UploadedDate &gt; this.monthAgo)\n          .ToArray()\n          .GroupBy(c =&gt; c.UploadedDate.Date)\n          .Select(c =&gt; new { Date = c.Key, Count = c.Count() })\n          .OrderByDescending(c =&gt; c.Date)\n          .ToDictionary(c =&gt; c.Date, c =&gt; c.Count);  \n      }\n      \n      sw.Stop();\n      System.Diagnostics.Trace.WriteLine(\"SW1: \" + sw.ElapsedMilliseconds.ToString());\n      \n      sw.Restart();\n      for (int i = 0; i  c.UploadedDate &gt; this.monthAgo)\n          .ToArray()\n          .GroupBy(c =&gt; c.UploadedDate.Date)\n          .OrderByDescending(c =&gt; c.Key.Date)\n          .ToDictionary(c =&gt; c.Key, c =&gt; c);  \n      }\n      sw.Stop();\n      System.Diagnostics.Trace.WriteLine(\"SW2: \" + sw.ElapsedMilliseconds.ToString());<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>var sw = Stopwatch.StartNew(); for (int i = 0; i new { Id = c.Id, UploadedDate = c.UploadedDate }) .Where(c =&gt; c.UploadedDate &gt; this.monthAgo) .ToArray() .GroupBy(c =&gt; c.UploadedDate.Date) .Select(c =&gt; <a class=\"more-link\" href=\"https:\/\/infobase.athn.ru\/program\/2012\/06\/optimizatsiya-linq-zaprosa\/\">Continue Reading \u2192<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[242],"class_list":["post-112","post","type-post","status-publish","format-standard","hentry","category-csharp","tag-optimizatsiya"],"_links":{"self":[{"href":"https:\/\/infobase.athn.ru\/program\/wp-json\/wp\/v2\/posts\/112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/infobase.athn.ru\/program\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/infobase.athn.ru\/program\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/infobase.athn.ru\/program\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/infobase.athn.ru\/program\/wp-json\/wp\/v2\/comments?post=112"}],"version-history":[{"count":0,"href":"https:\/\/infobase.athn.ru\/program\/wp-json\/wp\/v2\/posts\/112\/revisions"}],"wp:attachment":[{"href":"https:\/\/infobase.athn.ru\/program\/wp-json\/wp\/v2\/media?parent=112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/infobase.athn.ru\/program\/wp-json\/wp\/v2\/categories?post=112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/infobase.athn.ru\/program\/wp-json\/wp\/v2\/tags?post=112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}