﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>senthil commented on String processing is costly, but stupidity is more costly still</title><description>can someone what this is all about...
</description><link>http://ayende.com/3593/string-processing-is-costly-but-stupidity-is-more-costly-still#comment11</link><guid>http://ayende.com/3593/string-processing-is-costly-but-stupidity-is-more-costly-still#comment11</guid><pubDate>Tue, 23 Sep 2008 03:43:34 GMT</pubDate></item><item><title>Jan Limpens commented on String processing is costly, but stupidity is more costly still</title><description>looks like winmerge/diff to me, but i might be wrong.
  
  
anyway, there is a seemingly costly call to some engine.Storage.Nofier within a foreach loop. while it seems to have been better doing this only once, after the foreach.
  
  
but without knowing the context, this could be perfectly valid or hell breaking loose.
</description><link>http://ayende.com/3593/string-processing-is-costly-but-stupidity-is-more-costly-still#comment10</link><guid>http://ayende.com/3593/string-processing-is-costly-but-stupidity-is-more-costly-still#comment10</guid><pubDate>Fri, 12 Sep 2008 21:42:53 GMT</pubDate></item><item><title>testb commented on String processing is costly, but stupidity is more costly still</title><description>Screenshots -&gt; JetBrains dotTrace
  
engine.Cache.Whatever -&gt; LoD?
</description><link>http://ayende.com/3593/string-processing-is-costly-but-stupidity-is-more-costly-still#comment9</link><guid>http://ayende.com/3593/string-processing-is-costly-but-stupidity-is-more-costly-still#comment9</guid><pubDate>Fri, 12 Sep 2008 12:33:52 GMT</pubDate></item><item><title>Frank Quednau commented on String processing is costly, but stupidity is more costly still</title><description>Yeah, he likes to keep us in the dark. I've seen that rethorical mechanism quite a bit on diary blogs as well ;).
  
Like the other bits of life are too easy. 
  
The delegate for the NotifyOnChange also walks over all urls, which the outer foreach was also doing.
  
In the second shot, the iteration is taken outside the foreach loop which should speed up things quite nicely.
  
  
But then I'm probably wrong.
  
Cheers
</description><link>http://ayende.com/3593/string-processing-is-costly-but-stupidity-is-more-costly-still#comment8</link><guid>http://ayende.com/3593/string-processing-is-costly-but-stupidity-is-more-costly-still#comment8</guid><pubDate>Fri, 12 Sep 2008 08:50:59 GMT</pubDate></item><item><title>Gary commented on String processing is costly, but stupidity is more costly still</title><description>I love your blog, but sometimes you leave us mere mortals confused and dumbfounded.  Could we have a few lines of explanation, so that we can try to keep up!
  
  
  
  
</description><link>http://ayende.com/3593/string-processing-is-costly-but-stupidity-is-more-costly-still#comment7</link><guid>http://ayende.com/3593/string-processing-is-costly-but-stupidity-is-more-costly-still#comment7</guid><pubDate>Fri, 12 Sep 2008 08:33:48 GMT</pubDate></item><item><title>Art commented on String processing is costly, but stupidity is more costly still</title><description>What tool these screenshots are from?
</description><link>http://ayende.com/3593/string-processing-is-costly-but-stupidity-is-more-costly-still#comment6</link><guid>http://ayende.com/3593/string-processing-is-costly-but-stupidity-is-more-costly-still#comment6</guid><pubDate>Thu, 11 Sep 2008 22:43:11 GMT</pubDate></item><item><title>Bob commented on String processing is costly, but stupidity is more costly still</title><description>So, can anyone tell me what's happening here?
</description><link>http://ayende.com/3593/string-processing-is-costly-but-stupidity-is-more-costly-still#comment5</link><guid>http://ayende.com/3593/string-processing-is-costly-but-stupidity-is-more-costly-still#comment5</guid><pubDate>Thu, 11 Sep 2008 22:41:44 GMT</pubDate></item><item><title>Neal Blomfield commented on String processing is costly, but stupidity is more costly still</title><description>At least you caught it early, and like Stephen says doing the profiling and testing is the redemption. =)
  
  
Worked on a project (well before I knew / understood testing etc) that was supposed to rendered an image map if the number of datapoints was less than 100 (some images would have 800 or more datapoints).  The code should have been if() { foreach() } but was foreach(){ if() {} } - and went to production that way.
  
  
Suffice to say clients were complaining of slow page times in very short order. * very embarrassed developer *
</description><link>http://ayende.com/3593/string-processing-is-costly-but-stupidity-is-more-costly-still#comment4</link><guid>http://ayende.com/3593/string-processing-is-costly-but-stupidity-is-more-costly-still#comment4</guid><pubDate>Thu, 11 Sep 2008 19:40:42 GMT</pubDate></item><item><title>Lucas Goodwin commented on String processing is costly, but stupidity is more costly still</title><description>Almost like grabbing a new collection from the DB on every loop.
</description><link>http://ayende.com/3593/string-processing-is-costly-but-stupidity-is-more-costly-still#comment3</link><guid>http://ayende.com/3593/string-processing-is-costly-but-stupidity-is-more-costly-still#comment3</guid><pubDate>Thu, 11 Sep 2008 18:15:16 GMT</pubDate></item><item><title>josh commented on String processing is costly, but stupidity is more costly still</title><description>been there, done that, fixed it, and had it blow up on low end machines because of garbage collection. good to know the unsleeping one is also human. (chapter 6 is good; still working on it)
</description><link>http://ayende.com/3593/string-processing-is-costly-but-stupidity-is-more-costly-still#comment2</link><guid>http://ayende.com/3593/string-processing-is-costly-but-stupidity-is-more-costly-still#comment2</guid><pubDate>Thu, 11 Sep 2008 17:26:41 GMT</pubDate></item><item><title>Stephen commented on String processing is costly, but stupidity is more costly still</title><description>Hah, we've all done it, having the strategy to not fully "trust" yourself and do stuff like profiling or writing tests is the redemption.. right?
  
  
Only human after all ;)
</description><link>http://ayende.com/3593/string-processing-is-costly-but-stupidity-is-more-costly-still#comment1</link><guid>http://ayende.com/3593/string-processing-is-costly-but-stupidity-is-more-costly-still#comment1</guid><pubDate>Thu, 11 Sep 2008 15:46:58 GMT</pubDate></item></channel></rss>