<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Emad Alashi&#039;s Blog &#187; performance</title>
	<atom:link href="http://www.emadashi.com/index.php/tag/performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.emadashi.com</link>
	<description></description>
	<lastBuildDate>Sun, 15 Jan 2012 10:05:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Stressful Situations Make You Stupid</title>
		<link>http://www.emadashi.com/index.php/2010/05/stressful-situations-make-you-stupid/</link>
		<comments>http://www.emadashi.com/index.php/2010/05/stressful-situations-make-you-stupid/#comments</comments>
		<pubDate>Wed, 12 May 2010 07:16:19 +0000</pubDate>
		<dc:creator>Emad Alashi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[software management]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[stress]]></category>
		<category><![CDATA[stupid]]></category>

		<guid isPermaLink="false">http://www.emadashi.com/?p=348</guid>
		<description><![CDATA[Today we came across an interesting issue at work: we have two teams A and B who interchange API calls. Team A needed an API from team B to process a business that is owned by team B of course. The signature was like the following:
public OutputEntity MyMethod(List listOfIds);
It appeared afterward that this method was [...]]]></description>
			<content:encoded><![CDATA[<p>Today we came across an interesting issue at work: we have two teams A and B who interchange API calls. Team A needed an API from team B to process a business that is owned by team B of course. The signature was like the following:</p>
<p>public OutputEntity MyMethod(List listOfIds);</p>
<p>It appeared afterward that this method was very slow, and the client was already very upset about the low performance, which consequently caused big pressure on the teams by the superiors to enhance the performance.<br />
After investigating the issue, it appeared that the list of ID&#8217;s sent as input consists of some ID&#8217;s that do not need to be processed, this criteria of &#8220;not need to be processed&#8221; is a business owned by team B, done by using properties of the entities these ID&#8217;s represent. So the  solution to this issue was one of the following:</p>
<ol>
<li>Moving the business out of the API to the client application to do the filtering,<strong> since the calling method already has the entities themselves</strong> (not so good to move business out of scope!)</li>
<li>Let the API do the filtering, but this will worsen the performance <strong>because the API will have to retrieve these entities from the database in order to use its&#8217; properties</strong>!</li>
</ol>
<p>So is that a dead end? actually that was stupid! the situation was stressful enough and pressured by our superiors to enhance the performance that we missed a very simple fact:<strong> pass the list of entities themselves</strong>!</p>
<p>Stressful situations make us stupid, so make as less stress as possible on your team, help them to be smarter.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.emadashi.com/index.php/2010/05/stressful-situations-make-you-stupid/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Suspecting already used code</title>
		<link>http://www.emadashi.com/index.php/2008/06/suspecting-already-used-code/</link>
		<comments>http://www.emadashi.com/index.php/2008/06/suspecting-already-used-code/#comments</comments>
		<pubDate>Sun, 22 Jun 2008 14:37:12 +0000</pubDate>
		<dc:creator>Emad Alashi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[NHibernate]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[software management]]></category>

		<guid isPermaLink="false">http://eashi.wordpress.com/2008/06/22/suspecting-already-used-code/</guid>
		<description><![CDATA[In one of the modules I am working on, my unit tests used to take tremendous amount of time (4 minutes per test  ). I inherited the NHibernate config file from previous NHibernate test module that was used somewhere before!
At the beginning I thought that this is something common when you use NHibernate with rich [...]]]></description>
			<content:encoded><![CDATA[<p>In one of the modules I am working on, my unit tests used to take tremendous amount of time (4 minutes per test  <a href="http://eashi.files.wordpress.com/2008/06/clip-image0011.gif"><img src="http://eashi.files.wordpress.com/2008/06/clip-image001-thumb1.gif" alt="clip_image001" width="18" height="18" /></a>). I inherited the NHibernate config file from previous NHibernate test module that was used somewhere before!</p>
<p>At the beginning I thought that this is something common when you use NHibernate with rich applications, so I didn’t pay much attention, but then it became a real headache.</p>
<p>One of the best colleagues notified me about an important note, which is that I was loading other domain objects from a shared  module (which I didn’t really need).<br />
I checked the NHibernate config file, and removed the mapping line that includes those shared domain objects, and the time shrank to 15 seconds!<a href="http://eashi.files.wordpress.com/2008/06/clip-image0021.gif"><img src="http://eashi.files.wordpress.com/2008/06/clip-image002-thumb1.gif" alt="clip_image002" width="38" height="18" /></a></p>
<p>The moral of the story is that it’s ok to suspect code we inherit from others, other modules or projects, we might not gain anything by doing that, but I am almost sure that we won’t lose!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.emadashi.com/index.php/2008/06/suspecting-already-used-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

