jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg" <stefan.guggisb...@gmail.com>
Subject Re: Saving of nodes takes too long/Indexing configuration
Date Mon, 16 Jul 2007 12:36:14 GMT
hi,

On 7/16/07, Sridhar Raman <sridhar.raman@gmail.com> wrote:
> Also, how do I switch to bundle persistence?  Currently, this is the
> configuration in my workspace.xml file:
>
> >     <PersistenceManager class="
> > org.apache.jackrabbit.core.state.db.DerbyPersistenceManager">
> >      <param name="url" value="jdbc:derby:${wsp.home}/db;create=true"/>
> >      <param name="schemaObjectPrefix" value="${wsp.name}_"/>
> >     </PersistenceManager>
> >
>
> How do I change it to include the bundle persistance for Derby?

while switching to BundleDbPersistenceManager would certainly
provide a certain performance gain i doubt that it would solve your
issue. you're using an embedded derby db which should provide
a decent perfomance. i just ran a quick test using DerbyPersistenceManager:
saving 1000 nodes with 5 string properties each takes
about 3 seconds on a 1.9ghz intel macbook pro (i.e. ~12s./4000 nodes).

you mentioned that in your case it takes ~32 minutes (!) to save 4000 nodes.
please tell us more on your data model. are you storing large binary properties?
how many properties (and of what type) are you storing per node?
can you provide a simple test case?

cheers
stefan

>
> Thanks,
> Sridhar
>
> On 7/16/07, Sridhar Raman <sridhar.raman@gmail.com> wrote:
> >
> > I use DerbyPersistenceManager and LocalFileSystem.  So would I be able to
> > switch to bundle persistence in this case, and would it be helpful?
> >
> > On 7/15/07, Jukka Zitting <jukka.zitting@gmail.com> wrote:
> > >
> > > Hi,
> > >
> > > On 7/14/07, Sridhar Raman <sridhar.raman@gmail.com> wrote:
> > > > I use Jackrabbit extensively, and one problem that I seem to run into
> > > a lot
> > > > of times is when I import data, and save the nodes.  For saving 4000
> > > nodes,
> > > > it almost takes 32 mins to execute the session.save() command.  Any
> > > way of
> > > > fixing this?
> > > >
> > > > Is it probably because all my data is getting indexed?  Could I
> > > somehow
> > > > specify only specific properties/types to be indexed?
> > >
> > > I much more suspect that the time is spent talking to the persistence
> > > store. Are you using an external database for persistence?
> > >
> > > The traditional database persistence managers issue a separate SQL
> > > statement (causing a network roundtrip to the database) for each node
> > > *and* property being saved, which can quickly end up taking a lot of
> > > time especially if the network roundtrip to a database server takes
> > > more than a few milliseconds.
> > >
> > > Good solutions to this problem are either to switch to the bundle
> > > persistence (which uses just a single statement for a node and all
> > > it's properties) included in Jackrabbit 1.3 and/or using an embedded
> > > database like the default Derby.
> > >
> > > BR,
> > >
> > > Jukka Zitting
> > >
> >
> >
>

Mime
View raw message