From: ron.vandenbranden <ron...@ka...> - 2012-09-03 11:33:01
|
Hi, I've been trying to get my head around passing correct paths to XSLTServlet within a controller.xql file. I've finally found out that the path should start with {$exist:root} and {$exist:controller}, e.g.: <dispatch xmlns="http://exist.sourceforge.net/NS/exist"> <forward url="{$exist:controller}/xquery/test.xq"/> <view> <forward servlet="XSLTServlet"> <set-attribute name="xslt.stylesheet" value="{$exist:root}{$exist:controller}/xslt/test.xsl"/> </forward> </view> </dispatch> Yet, in the past I came to believe there was something wrong with this approach, since in my developing environment it takes very long to execute such a pipeline. At first, I thought the double start slash (which the concatenation of $exist:root and $exist:controller produces) was responsible, so I tried to find ways to make it execute faster. Apparently, using an appropriate relative path (by prefixing the path with an appropriate number of ../ steps) seemed to solve this performance bottleneck. After some testing, however, I think this delay seems to be bound to following variables (using eXist-trunk, rev. 16647): -controller is executed from the filesystem (not from the database) -controller is executed on a Windows PC For example, above pipeline (accessible via http://localhost:8080/exist/controller_test/test.htm in the attached sample app), which just executes a simple XQuery and styles its output via a simple XSLT stylesheet, can easily take a stunning 7-8 seconds when executed from a Windows filesystem! However, when executed from a Linux filesystem, or from the db (on both Windows or Linux), the request completes within milliseconds, as expected. Is there any way to get more insight into what's consuming this awful lot of time (some logging settings, perhaps)? Any other users with similar experiences on Windows? Ron |