Return-Path: Delivered-To: apmail-incubator-vxquery-dev-archive@minotaur.apache.org Received: (qmail 97729 invoked from network); 4 Jan 2010 22:00:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Jan 2010 22:00:12 -0000 Received: (qmail 84001 invoked by uid 500); 4 Jan 2010 22:00:12 -0000 Delivered-To: apmail-incubator-vxquery-dev-archive@incubator.apache.org Received: (qmail 83982 invoked by uid 500); 4 Jan 2010 22:00:12 -0000 Mailing-List: contact vxquery-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: vxquery-dev@incubator.apache.org Delivered-To: mailing list vxquery-dev@incubator.apache.org Received: (qmail 83972 invoked by uid 99); 4 Jan 2010 22:00:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jan 2010 22:00:12 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_PASS,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [98.136.44.57] (HELO smtp102.prem.mail.sp1.yahoo.com) (98.136.44.57) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 04 Jan 2010 22:00:05 +0000 Received: (qmail 54585 invoked from network); 4 Jan 2010 21:59:45 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=m+NB2vTMFtzjovkVMj3mOgtF3uylLdlVmrSwJHIrCxlvvMroRowmyPPMWHVg+xoyxvZv2Rv/ohsTdi/Z4anCzaZxSfzp51XRa0wM4olQpxgRmCdY7dxExwEHzG4DTgvCa+mmVwtqO1jWmNN4uQJt/VXuE/4AqJHqzNtdj2shdlg= ; Received: from c-98-210-181-196.hsd1.ca.comcast.net (vborky@98.210.181.196 with plain) by smtp102.prem.mail.sp1.yahoo.com with SMTP; 04 Jan 2010 13:59:45 -0800 PST X-Yahoo-SMTP: ZvR6Aa.swBBi9aze9_P4M914Ag-- X-YMail-OSG: Da3d_scVM1mVUXK5rlC2pNv7.rZaMLaDH00ZtFnbVKX74A3bGooOp6E6eqdzmLtTk124yV5vZGLc1LjB5jT3MJYtdnTSX3XZsK1_CITq5Ef1jGL9YoHGSW7L0K8S6f7ym7vivXAtMh7o89CIwVSkkQU45n8hh5yOl1VBoCI2KodPOM__zi8IN_k5hEV4rrMkYpv7x.3TjpeO7Ws06C_FMePlSAR6HX97CWAu5zop_Z1b8tc61Kn2YO5jDAXzCfcIS0E2dycBUWrGyhClyH5HVx69V8fBLPix3cEI4UcDyK2llrYTWi7d8zMA7rckmj7zg4Y- X-Yahoo-Newman-Property: ymail-3 Message-ID: <4B4264D0.5060009@yahoo.com> Date: Mon, 04 Jan 2010 13:59:44 -0800 From: Vinayak Borkar User-Agent: Thunderbird 2.0.0.23 (X11/20090825) MIME-Version: 1.0 To: vxquery-dev@incubator.apache.org Subject: Re: XTest References: <4B424D00.6050200@yahoo.com> <4B425478.3000000@yahoo.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Jochen, The test I mention is not something we have come up with. XQTS is the official testsuite to test XQuery compliance, and the query I mention is one out of that suite. The fact that this query takes a long time means that we need to fix the engine to make this case more efficient. If you are interested I could describe in more detail the exact issue and some possible fixes. Vinayak Jochen Wiedmann wrote: > Consider to enable the test only if some system property is set. A > normal user won't be able to distinguish between "infinite loop" and > "tales a very very long time". > > Alternatively, select a representative subset of the 1.1M integers and > restrict the test to those. > > Jochen > > > On Mon, Jan 4, 2010 at 9:50 PM, Vinayak Borkar wrote: >> Its not an infinite loop -- >> Expressions/Construct/DirectConElem/DirectConElemContent//Constr-cont-document-3.xq >> >> is taking a long time to run. I am pasting the query below. >> >> The query iterates over about 1.1 M integers 70 at a time and calls >> subsequence() for the 70 items in the window. This is a quadratic operation >> in the engine -- and takes a long time. >> >> Should we optimize this case? >> >> >> Thanks, >> Vinayak >> >> >> --- Query begin --- >> >> >> declare variable $codepoints as xs:integer+ := (9, (: 0x9 :) >> 10,(: 0xA :) >> 13,(: 0xD :) >> 32 to 55295, (: 0x20 - 0xD7FF >> :) >> 57344 to 65532, (: 0xE000 - >> 0xFFFD :) >> 65536 to 1114111 (: 0x10000 - >> 0x10FFFF :)); >> declare variable $count as xs:integer := count($codepoints); >> declare variable $lineWidth as xs:integer := 70; >> >> >> >> { >> " ", >> " ", >> (: The outputted file is rather big, so to make it managable, we output >> a chunk of $lineWidth characters in each element. >> :) >> for $i in (1 to $count idiv $lineWidth) >> let $startOffset := (($i - 1) * $lineWidth) + 1 >> return (> e="{$codepoints[$startOffset] + $lineWidth}"> >> { >> codepoints-to-string(subsequence($codepoints, >> $startOffset, $lineWidth)) >> } >> , " ") >> } >> >> >> --- Query end --- >> >> Vinayak Borkar wrote: >>> Till, >>> >>> >>> Does XTest on the test suite terminate? Some query is throwing the engine >>> into an infinite loop. Do you see this? >>> >>> >>> Thanks, >>> Vinayak >>> >> > > >