Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 54465 invoked from network); 27 Jul 2009 14:44:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Jul 2009 14:44:30 -0000 Received: (qmail 76593 invoked by uid 500); 27 Jul 2009 14:45:34 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 76516 invoked by uid 500); 27 Jul 2009 14:45:34 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 76508 invoked by uid 99); 27 Jul 2009 14:45:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Jul 2009 14:45:34 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of stefan.guggisberg@gmail.com designates 209.85.220.217 as permitted sender) Received: from [209.85.220.217] (HELO mail-fx0-f217.google.com) (209.85.220.217) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Jul 2009 14:45:24 +0000 Received: by mail-fx0-f217.google.com with SMTP id 17so34058fxm.43 for ; Mon, 27 Jul 2009 07:45:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=99YfMrqjL1unJnYJ2zN8JmVZjQQfT5BvJXA6PrKWSso=; b=a2E3wMiI5X/uDacdAShnM3O5lN47EMc8UWCmGH0ZuM56nmrvo8EafKOaJ76T6WESjH 67/SiXA178CnWN7c0PQ/CPEtdI078tvzcb95g5DWJYcALUZa26x0/jDydHZF0U8Q+S1e Se8QofEzijEQ3iAdgSxLXZqmR9mYlEsYaZpoo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=XsP1lugruRad4RFEbHiMsfChV+hW6+t5I8fHoYl/wSbOjB0N0BHLPEgg2awU85gVsg aqOJZoOniAbMyGiSqEb8Pe38htfYK+hUXM/oVoTlxz7w14P+/cbyisFOsMv8jBKK3YxV FSa8SrwrudMRK+Aq9X9BF3aKIaUsLhdgwzjPo= MIME-Version: 1.0 Received: by 10.223.115.80 with SMTP id h16mr2717095faq.94.1248705903275; Mon, 27 Jul 2009 07:45:03 -0700 (PDT) In-Reply-To: <24681862.post@talk.nabble.com> References: <24619853.post@talk.nabble.com> <90a8d1c00907222358n75161f24mb0d8dba085470dfb@mail.gmail.com> <24620741.post@talk.nabble.com> <90a8d1c00907230510o557f632dk314a9933ff493a11@mail.gmail.com> <24680489.post@talk.nabble.com> <24681170.post@talk.nabble.com> <24681862.post@talk.nabble.com> Date: Mon, 27 Jul 2009 16:45:03 +0200 Message-ID: <90a8d1c00907270745j77cd3fd7t5ad6c7683e89689c@mail.gmail.com> Subject: Re: Performance of Jackrabbit From: Stefan Guggisberg To: dev@jackrabbit.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Mon, Jul 27, 2009 at 4:36 PM, Ajai wrote: > > Actually i am doing the right way as you mentioned, having session.save() > after each file. > But i do have text extractors and indexes turned on. > My Configuration: > > for searchindex: > > > > > > > > > > > > > > > > > > > > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 > > > My Index config: > > > "http://jackrabbit.apache.org/dtd/indexing-configuration-1.0.dtd"> > =A0 =A0 =A0 =A0xmlns:jcr=3D"http://www.jcp.org/jcr/1.0"> > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0jcr:content > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0jcr:data > =A0 =A0 =A0 =A0 > > > Kindly tell me the optimal way to use them. as already suggested in my earlier post: 1. disable search index or text extractors and compare results 2. remove checkin() call and compare results 3. use embedded derby and compare results 4. if you provide GenRandom.java, i'll run the test on my own machine. cheers stefan > > > Thanks > Ajai G > > > > Guo Du wrote: >> >> On Mon, Jul 27, 2009 at 2:56 PM, Ajai wrote: >>> >>> Hi Guo, >>> >>> Yes, i am adding a document to the repository. >>> Is there multiple ways to do a save? >>> >>> I am doing it the following way, >>> >>> fileNode =3D matterNode.addNode(fileName, "nt:file"); >>> fileNode.addMixin("mix:versionable"); >>> fileNode.addMixin("mix:referenceable"); >>> Node resNode =3D fileNode.addNode("jcr:content", "nt:resource"); >>> resNode.addMixin("mix:versionable"); >>> resNode.addMixin("mix:referenceable"); >>> resNode.setProperty("jcr:mimeType", mimeType); >>> resNode.setProperty("jcr:encoding", ENCODING_UTF_8); >>> resNode.setProperty("jcr:data", new FileInputStream(file)); >>> Calendar lastModified =3D Calendar.getInstance(); >>> lastModified.setTimeInMillis(file.lastModified()); >>> resNode.setProperty("jcr:lastModified", lastModified); >>> // finally >>> session.save(); >>> >>> Please suggest if any changes can be done. >>> >> >> >> Your code doesn't show details of the loop. >> >> >> WRONG >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> loop{ // 375000 times >> =A0 addNode(...) >> } >> session.save(); >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> >> >> >> CORRECT >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> loop{ // 375000 times >> =A0 addNode(...) >> =A0 session.save(); >> } >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> You may also add multiple documents before call session.save() to take >> advantage of batch process more efficiently. But not after add all >> 375000 documents. >> >> --Guo >> >> > > -- > View this message in context: http://www.nabble.com/Performance-of-Jackra= bbit-tp24619853p24681862.html > Sent from the Jackrabbit - Dev mailing list archive at Nabble.com. > >