<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Performance of web scripts in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/performance-of-web-scripts/m-p/168972#M122391</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Keep in mind that the bulk of the heavy lifting performed by a Web Script is typically done by the various Alfresco APIs that the Web Script calls, and those are native Java no matter what language the Web Script is implemented in.&amp;nbsp; In other words, the performance difference between Javascript/FTL and native Java is likely not as great as you might think - for example, one Alfresco project I worked on where we rewrote JS based Web Scripts in Java (for performance reasons), the improvement ended up being less than 10%.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd be trying to further isolate where the time is being spent - for example instrumenting your JS controller to capture detailed timing metrics (both for the entire script as well as individual pieces of logic within it), comparing the total execution of the script against the total execution time reported by the client, removing the FTL template to see what difference that makes, etc. etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Apr 2008 14:18:40 GMT</pubDate>
    <dc:creator>pmonks</dc:creator>
    <dc:date>2008-04-09T14:18:40Z</dc:date>
    <item>
      <title>Performance of web scripts</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/performance-of-web-scripts/m-p/168969#M122388</link>
      <description>Hi -I have a question on the overall performance of web scripts. It seems that there is quite a bit of overhead "outside" the web script itself. Our scenario is as follows:We have a .net program doing uploading a file by doing an http post to an alfresco web script . The total time for the transacti</description>
      <pubDate>Wed, 09 Apr 2008 02:51:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/performance-of-web-scripts/m-p/168969#M122388</guid>
      <dc:creator>eg</dc:creator>
      <dc:date>2008-04-09T02:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Performance of web scripts</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/performance-of-web-scripts/m-p/168970#M122389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I actually don't have enough experience performance tuning Web Scripts specifically, but here are some ideas:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Consider switching the web script controller code to Java.&amp;nbsp; I understand that you lose ability to easily change it, but perhaps you can develop in JavaScript and then port over to Java. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. For web scripts that are read-only and easily parametrizable, consider using caching technology on top of your webserver.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Separate your content store and lucene index stores on different physical disks - this should is generally a good idea for deploying since it separates content reads and index reads / writes from each other.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Which version of Alfresco are you currently using?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2008 04:04:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/performance-of-web-scripts/m-p/168970#M122389</guid>
      <dc:creator>jbarmash</dc:creator>
      <dc:date>2008-04-09T04:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: Performance of web scripts</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/performance-of-web-scripts/m-p/168971#M122390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is this something that Alfresco is looking into?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Presumably both the Javascript and Freemarker could be "compiled" into Java before deployment? This would speed things up no end. So, perhaps, you could have a flag in the web script description file that let you chose between dynamic or compiled script behaviour?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Javascript API is quite a lot easier to use than the Java API; surely it would be easier to stick with this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rob&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2008 07:26:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/performance-of-web-scripts/m-p/168971#M122390</guid>
      <dc:creator>dinger</dc:creator>
      <dc:date>2008-04-09T07:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: Performance of web scripts</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/performance-of-web-scripts/m-p/168972#M122391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Keep in mind that the bulk of the heavy lifting performed by a Web Script is typically done by the various Alfresco APIs that the Web Script calls, and those are native Java no matter what language the Web Script is implemented in.&amp;nbsp; In other words, the performance difference between Javascript/FTL and native Java is likely not as great as you might think - for example, one Alfresco project I worked on where we rewrote JS based Web Scripts in Java (for performance reasons), the improvement ended up being less than 10%.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd be trying to further isolate where the time is being spent - for example instrumenting your JS controller to capture detailed timing metrics (both for the entire script as well as individual pieces of logic within it), comparing the total execution of the script against the total execution time reported by the client, removing the FTL template to see what difference that makes, etc. etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2008 14:18:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/performance-of-web-scripts/m-p/168972#M122391</guid>
      <dc:creator>pmonks</dc:creator>
      <dc:date>2008-04-09T14:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Performance of web scripts</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/performance-of-web-scripts/m-p/168973#M122392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you switch on log4j DEBUG for the Web Scripts engine, you'll get timings for script, template &amp;amp; overall execution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;log4j.logger.org.alfresco.web.scripts=debug&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Templates are already pre-compiled.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You need to determine where the time is being spent, before optimising otherwise it's all guess work.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2008 18:06:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/performance-of-web-scripts/m-p/168973#M122392</guid>
      <dc:creator>davidc</dc:creator>
      <dc:date>2008-04-09T18:06:19Z</dc:date>
    </item>
  </channel>
</rss>

