<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Robert Bruckner's Advanced Reporting Services Blog : On-Demand Processing</title><link>http://blogs.msdn.com/robertbruckner/archive/tags/On-Demand+Processing/default.aspx</link><description>Tags: On-Demand Processing</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>On-Demand Report Processing in Reporting Services 2008</title><link>http://blogs.msdn.com/robertbruckner/archive/2008/08/11/on-demand-report-processing-in-rs-2008.aspx</link><pubDate>Tue, 12 Aug 2008 09:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8848402</guid><dc:creator>Robert M. Bruckner</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.msdn.com/robertbruckner/comments/8848402.aspx</comments><wfw:commentRss>http://blogs.msdn.com/robertbruckner/commentrss.aspx?PostID=8848402</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;FONT face=tahoma,arial,helvetica,sans-serif&gt;You may have heard by now that the report processing engine of Reporting Services 2008 works significantly different underneath the covers, compared to previous releases.&amp;nbsp; While I plan to dive into more technical details in future postings, I wanted&amp;nbsp;to provide a few examples upfront explaining why&amp;nbsp;you as a report author or end user&amp;nbsp;might care:&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL type=disc&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;FONT face=tahoma,arial,helvetica,sans-serif&gt;&lt;STRONG&gt;On-demand processing of reports with many datasets and data regions.&lt;BR&gt;&lt;/STRONG&gt;For instance, if&amp;nbsp;a user only views&amp;nbsp;page one through three, and those pages only refer to data regions / expressions referencing DataSet1, all other data regions bound to other datasets are not necessarily processed immediately.&amp;nbsp; Processing can be delayed&amp;nbsp;until a user&amp;nbsp;navigates to a particular page showing that data region or&amp;nbsp;hitting an expression that references information from those other datasets.&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;FONT face=tahoma,arial,helvetica,sans-serif&gt;&lt;STRONG&gt;Reports with heavy usage of interactivity can be significantly faster.&amp;nbsp; &lt;BR&gt;&lt;/STRONG&gt;The main reason for the speedup is that certain interactivity related calculations (e.g. toggles, drillthrough actions) are now performed on-the-fly as pages are viewed by the user, instead of having to do these upfront before the first page is shown.&lt;BR&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;FONT face=tahoma,arial,helvetica,sans-serif&gt;&lt;STRONG&gt;Faster page-by-page navigation when viewing reports interactively.&amp;nbsp; &lt;BR&gt;&lt;/STRONG&gt;The new architecture allows us to cache a few bytes per page that enable quick restart of pagination of a partially/fully paginated report.&amp;nbsp; As a result, navigating to a page of a report which was already previously accessed during the same session is now faster, particularly the larger the report in size.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;You can verify this with a report with several thousand pages.&amp;nbsp; Navigate to the last page of the report (which triggers paginating the entire report), and then try to randomly navigate to any page within the report.&amp;nbsp; Reporting Services 2008 will be faster.&lt;BR&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;STRONG&gt;&lt;FONT face=tahoma,arial,helvetica,sans-serif&gt;S&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;STRONG&gt;&lt;FONT face=tahoma,arial,helvetica,sans-serif&gt;&lt;FONT face=tahoma,arial,helvetica,sans-serif&gt;ma&lt;/FONT&gt;ller memory footprint.&lt;BR&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face=tahoma,arial,helvetica,sans-serif&gt;The memory footprint of requests is generally smaller with the on-demand processing engine, particularly for very large reports.&amp;nbsp; However on a system&amp;nbsp;with low load, you may not see any significant working set difference in task manager due to various types of caches utilized within the processing engine.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR style="mso-special-character: line-break"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;&lt;STRONG&gt;&lt;FONT face=tahoma,arial,helvetica,sans-serif&gt;So what is the main architectural difference with on-demand report processing?&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;FONT face=tahoma,arial,helvetica,sans-serif&gt;Unlike the RS 2005 processing engine that processed the report as a snapshot evaluating all expressions exactly once upfront (including textbox values, style expressions, etc.), the RS 2008 on-demand processing engine pre-computes and persists only certain invariants, such as grouping, sorting, filtering, aggregates, and report/group variables.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;All other expressions (style expressions, textbox values) are evaluated &lt;B style="mso-bidi-font-weight: normal"&gt;on-demand&lt;/B&gt; based on the invariants, at the time a rendering extension requests a specific page containing those values.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Hence, you could also call it rendering-driven on-demand processing engine.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=tahoma,arial,helvetica,sans-serif&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;You probably now think,&amp;nbsp;thanks that’s&amp;nbsp;nice;&amp;nbsp;and where is the catch? &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Wingdings; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;J&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;FONT face=tahoma,arial,helvetica,sans-serif&gt;Well, most expressions in a report, particularly textbox values and style expressions, are evaluated on-demand in Reporting Services 2008 as you navigate to a particular page.&amp;nbsp; If you go&amp;nbsp;there multiple times, it might&amp;nbsp;be re-evaluated again.&amp;nbsp; Try this to see the effect of on-demand processing:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;FONT face=tahoma,arial,helvetica,sans-serif&gt;Generate a multi-page report with a textbox value of &lt;FONT face="courier new,courier"&gt;=Now&lt;/FONT&gt; on the first page.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;/SPAN&gt;&lt;FONT face=tahoma,arial,helvetica,sans-serif&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;View the first page in HTML and note the textbox timestamp value.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;/SPAN&gt;&lt;FONT face=tahoma,arial,helvetica,sans-serif&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;Navigate to the second page, then go back to the first page.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;/SPAN&gt;&lt;FONT face=tahoma,arial,helvetica,sans-serif&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;Note that the textbox was re-evaluated as the first page was rendered again in RS 2008. The timestamp changed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;FONT face=tahoma,arial,helvetica,sans-serif&gt;If you do not want this on-demand behavior&amp;nbsp;in particular cases&amp;nbsp;(e.g. time-dependent calculations, custom code, or expensive calculations requiring caching), you should use so-called Report Variables or Group Variables, and then reference the variable value in the report (e.g. &lt;FONT face="courier new,courier"&gt;=Variables!V1.Value&lt;/FONT&gt;).&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Variables&amp;nbsp;are covered in more detail in a &lt;/FONT&gt;&lt;A class="" href="http://blogs.msdn.com/robertbruckner/archive/2008/07/20/Using-group-variables-in-reporting-services-2008-for-custom-aggregation.aspx" mce_href="http://blogs.msdn.com/robertbruckner/archive/2008/07/20/Using-group-variables-in-reporting-services-2008-for-custom-aggregation.aspx"&gt;&lt;FONT face=tahoma,arial,helvetica,sans-serif&gt;previous posting&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=tahoma,arial,helvetica,sans-serif&gt;.&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;FONT face=tahoma,arial,helvetica,sans-serif&gt;If it is&amp;nbsp;just about consistent time stamps, you should instead use &lt;FONT face="courier new,courier"&gt;=Globals!ExecutionTime&lt;/FONT&gt;, regardless of the version of Reporting Services&amp;nbsp;(more info on &lt;/FONT&gt;&lt;A class="" href="http://msdn.microsoft.com/en-us/library/ms157274.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/ms157274.aspx"&gt;&lt;FONT face=tahoma,arial,helvetica,sans-serif&gt;global built-in collections &lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=tahoma,arial,helvetica,sans-serif&gt;is available on MSDN).&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;Among other topics, future postings in the on-demand processing series will also provide report design tips to better leverage the new processing engine in RS 2008. &lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8848402" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/robertbruckner/archive/tags/Performance/default.aspx">Performance</category><category domain="http://blogs.msdn.com/robertbruckner/archive/tags/RS+2008/default.aspx">RS 2008</category><category domain="http://blogs.msdn.com/robertbruckner/archive/tags/On-Demand+Processing/default.aspx">On-Demand Processing</category></item></channel></rss>