<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.eiffelroom.org" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>eiffelroom - UTF-8 Unicode .NET - Comments</title>
 <link>http://www.eiffelroom.org/tag/utf_8_unicode_net</link>
 <description>Comments for &quot;UTF-8 Unicode .NET&quot;</description>
 <language>en</language>
<item>
 <title>There is a overhead involved</title>
 <link>http://www.eiffelroom.org/blog/peter_gummer/utf_8_in_net_revisited#comment-255</link>
 <description>&lt;p&gt;There is a overhead involved but most of the time I still got a pretty good indication where I can start to optimize. It&#039;s also possible to just selectively trace certain functions only, which reduces the profiling overhead a lot. If you look at the data in kcachegrind or a similar tool there is also more data available than this single graph can show you. E.g. the number of calls are also listed.&lt;/p&gt;

</description>
 <pubDate>Mon, 21 May 2007 00:49:07 -0700</pubDate>
 <dc:creator>patrickr</dc:creator>
 <guid isPermaLink="false">comment 255 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>No guarentees</title>
 <link>http://www.eiffelroom.org/blog/peter_gummer/utf_8_in_net_revisited#comment-254</link>
 <description>&lt;p&gt;Because you have no guarantees that the overhead is distributed proportionally to the true execution time of the routines involved. Instead, I would expect the overhead to be distributed according to the frequency of the routine calls, although I don&#039;t know this for sure.&lt;/p&gt;

&lt;p&gt;So I am interested in the proportion of the time spent in UTF-8 routines, not the frequency at which they are called. I don&#039;t care much about the latter as long as the overall time spent is small (because if it is small, there is no point in trying to optimize it). Colin Adams&lt;/p&gt;

</description>
 <pubDate>Sat, 19 May 2007 23:51:00 -0700</pubDate>
 <dc:creator>colin-adams</dc:creator>
 <guid isPermaLink="false">comment 254 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Overhead</title>
 <link>http://www.eiffelroom.org/blog/peter_gummer/utf_8_in_net_revisited#comment-253</link>
 <description>&lt;p&gt;Hey Colin, I don&#039;t understand why profiler overhead invalidates the percentages.&lt;/p&gt;

&lt;p&gt;I&#039;m no expert on using profilers, but my experience with NProf 0.9 was that it increased the total run time from about twenty seconds up to about four minutes: a factor of 10 or so. In a normal twenty-second run outside the profiler, there&#039;s &lt;strong&gt;(1)&lt;/strong&gt; a delay of about five seconds while our VB application loads; then &lt;strong&gt;(2)&lt;/strong&gt; I click a few buttons, which takes a couple of seconds; then &lt;strong&gt;(3)&lt;/strong&gt; there&#039;s an eight- or nine-second delay which (as far as I can figure out) is the .NET jitter just-in-time compiling a huge amount of Eiffel code (our stuff + base library routines + Gobo geyacc and gelex stuff); followed by &lt;strong&gt;(4)&lt;/strong&gt; a second or so of parsing and then &lt;strong&gt;(5)&lt;/strong&gt; a second or so of populating some GUI controls. Therefore, the twenty seconds total run time consists of only about five or six seconds of time that&#039;s likely to be affected by profiler overhead; which would be an overhead factor of 80 or so.&lt;/p&gt;

&lt;p&gt;In other words, I think the NProf overhead factor is somewhere between 10 and 100.&lt;/p&gt;

&lt;p&gt;Despite this, I found the percentages reported by NProf to be very useful. They showed me two places where I should optimise, and doing so has cut steps &lt;strong&gt;(4)&lt;/strong&gt; and &lt;strong&gt;(5)&lt;/strong&gt; from about three seconds down to about one second. Without NProf&#039;s guidance, I might have attempted the &lt;code class=&quot;geshifilter eiffel&quot;&gt;SYSTEM_STRING_FACTORY&lt;/code&gt; optimisation, but there&#039;s no way I would figured out the other one.&lt;/p&gt;

&lt;p&gt;(NProf hasn&#039;t helped me with the big delay at step &lt;strong&gt;(3)&lt;/strong&gt;. This delay is constant, regardless of what data file I feed to our application, and seems to be due to the .NET jitter infrastructure, so I don&#039;t think a profiler is going to help me there.)&lt;/p&gt;

</description>
 <pubDate>Sat, 19 May 2007 20:08:13 -0700</pubDate>
 <dc:creator>peter_gummer</dc:creator>
 <guid isPermaLink="false">comment 253 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Overhead</title>
 <link>http://www.eiffelroom.org/blog/peter_gummer/utf_8_in_net_revisited#comment-252</link>
 <description>&lt;p&gt;OK. I shall remember that. But I don&#039;t know if it shows anything meaningful.&lt;/p&gt;

&lt;p&gt;I&#039;d rather see the total accumulated time (as a %) of all routines in UC_UTF8_STRING.&lt;/p&gt;

&lt;p&gt;But it is only meaningful if the overhead of profiling is low. Last time I use the ES profiler, it lengthened runtimes by a factor of about 100, which meant it was useless.&lt;/p&gt;

&lt;p&gt;Do you have the elapsed times with and without profiling for comparison? Colin Adams&lt;/p&gt;

</description>
 <pubDate>Sat, 19 May 2007 12:15:45 -0700</pubDate>
 <dc:creator>colin-adams</dc:creator>
 <guid isPermaLink="false">comment 252 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>It&#039;s generated by running</title>
 <link>http://www.eiffelroom.org/blog/peter_gummer/utf_8_in_net_revisited#comment-251</link>
 <description>&lt;p&gt;It&#039;s generated by running the app with the callgrind tool from valgrind (&lt;a href=&quot;http://valgrind.org/)&quot;&gt;http://valgrind.org/)&lt;/a&gt; and then back translating the c names into eiffel names by using &lt;a href=&quot;http://eiffelroom.com/tool/valgrind_converter&quot;&gt;http://eiffelroom.com/tool/valgrind_converter&lt;/a&gt; and then I used kcachegrind (&lt;a href=&quot;http://kcachegrind.sourceforge.net/cgi-bin/show.cgi)&quot;&gt;http://kcachegrind.sourceforge.net/cgi-bin/show.cgi)&lt;/a&gt;.&lt;/p&gt;

</description>
 <pubDate>Sat, 19 May 2007 11:11:19 -0700</pubDate>
 <dc:creator>patrickr</dc:creator>
 <guid isPermaLink="false">comment 251 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Pretty diagram</title>
 <link>http://www.eiffelroom.org/blog/peter_gummer/utf_8_in_net_revisited#comment-250</link>
 <description>&lt;p&gt;That&#039;s a really pretty diagram Patrick.&lt;/p&gt;

&lt;p&gt;How do you produce it? Colin Adams&lt;/p&gt;

</description>
 <pubDate>Sat, 19 May 2007 04:44:33 -0700</pubDate>
 <dc:creator>colin-adams</dc:creator>
 <guid isPermaLink="false">comment 250 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Gobo xml parser</title>
 <link>http://www.eiffelroom.org/blog/peter_gummer/utf_8_in_net_revisited#comment-249</link>
 <description>&lt;p&gt;Here&#039;s a profile run of the gobo xml parser. The percentages are relative to XM_EIFFEL_PARSER_SKELETON::parse_from_string &lt;a href=&quot;http://www.eiffelroom.com/node/182&quot;&gt;&lt;img src=&quot;http://www.eiffelroom.com/files/images/xmlparser.png&quot; alt=&quot;gobo xml parser profile trace&quot; title=&quot;gobo xml parser profile trace&quot; width=&quot;2020&quot; height=&quot;1867&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

</description>
 <pubDate>Sat, 19 May 2007 03:04:33 -0700</pubDate>
 <dc:creator>patrickr</dc:creator>
 <guid isPermaLink="false">comment 249 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Apply Application Optimizations</title>
 <link>http://www.eiffelroom.org/blog/peter_gummer/utf_8_in_net_revisited#comment-245</link>
 <description>&lt;p&gt;&lt;em&gt;Apply Application Optimizations&lt;/em&gt; is a new option in EiffelStudio 6.0. I don&#039;t see it in 5.7. When we move to 6.0 I&#039;ll be sure to try it; I don&#039;t think any of our VB classes inherit from our Eiffel classes.&lt;/p&gt;

&lt;p&gt;Thanks for the advice, Paul.&lt;/p&gt;

</description>
 <pubDate>Thu, 17 May 2007 18:18:27 -0700</pubDate>
 <dc:creator>peter_gummer</dc:creator>
 <guid isPermaLink="false">comment 245 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>UC_UTF8_STRING performance</title>
 <link>http://www.eiffelroom.org/blog/peter_gummer/utf_8_in_net_revisited#comment-242</link>
 <description>&lt;p&gt;This was very interesting Peter. I have long suspected that the poor performance of the Gobo Eiffel XML parser was down to the UTF-8 implementation, and this seems to give corroboration of that conjecture. Colin Adams&lt;/p&gt;

</description>
 <pubDate>Thu, 17 May 2007 09:44:59 -0700</pubDate>
 <dc:creator>colin-adams</dc:creator>
 <guid isPermaLink="false">comment 242 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Squeezing more performance from Eiffel for .NET</title>
 <link>http://www.eiffelroom.org/blog/peter_gummer/utf_8_in_net_revisited#comment-241</link>
 <description>&lt;p&gt;We&#039;ve all been pretty busy around here of late so there is a whole list of articles I need to get to. One of them deals with performance optimization in .NET.&lt;/p&gt;

&lt;p&gt;There are two additional things you can do to boost performance of your .NET application. First inherit a .NET type (&lt;code class=&quot;geshifilter eiffel&quot;&gt;SYSTEM_OBJECT&lt;/code&gt; will probably be the most used) where multiple inheritance is not required. This will create an Eiffel single type. The implementation of single types do not have an interface and implementation type and so the CLR is able to optimized the jitted code. The CLR/JIT does not heavily optimize calls through interfaces, if at all!&lt;/p&gt;

&lt;p&gt;The second thing is to set the &lt;em&gt;Apply Application Optimizations&lt;/em&gt; target configuration option to &lt;code class=&quot;geshifilter eiffel&quot;&gt;&lt;span style=&quot;color: #800080;&quot;&gt;True&lt;/span&gt;&lt;/code&gt;. This should only be used for end-point libraries. The optimization only marks end-point classes as frozen so the jitter can optimize the virtually dispatched calls. There is no rule to say that the &lt;em&gt;Apply Application Optimizations&lt;/em&gt; option can only be used on end-point applications/libraries. If you want to enable it for your precompiled libraries then feel free. The side effect is that all the end-point classes are marked frozen and so cannot be extended. Fortunately the &lt;em&gt;Apply Application Optimizations&lt;/em&gt; option can be applied at a target, cluster and class level for fine grained control.&lt;/p&gt;

&lt;p&gt;In future versions of Eiffel for .NET there will be no need to perform the first step because it will be part of the application optimization options.&lt;/p&gt;

</description>
 <pubDate>Thu, 17 May 2007 09:30:35 -0700</pubDate>
 <dc:creator>paulbates</dc:creator>
 <guid isPermaLink="false">comment 241 at http://www.eiffelroom.org</guid>
</item>
</channel>
</rss>
