You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jspwiki.apache.org by Alexey Kakunin <ak...@emdev.ru> on 2009/04/07 16:58:18 UTC

Reference Manager perfomance

Hi!

On emforge.org we have a quite big problem related to ReferenceManager:
actually, application start takes about 10-15 minutes, and most of time it
spent in ReferecenManager.initialize method (hm - how long jspwiki.org takes
to start?)

Actually, I suppose it is because we have many (even sometimes empty) pages
(becasue for each task wiki-page with description is created), and ,
referenceManager is called

// Refresh with the latest copy
page = m_engine.getPage( page.getName() );

for each page.

I wanted to work on some reimplementation of ReferenceManager, but found,
WikiEngine is used it directly (not via some Interface) - so, I cannot
simple implement another implementation (like it is possible to do for
PageProviders for example) and use it instead of default.

Also, since most of methods/attributes of this class are private, I cannot
simple inherint my class from this implementation and reuse already
implemented functionality.

So, I have some suggestions:

1. Define interface for ReferenceManager
2. Make it possible to control ReferenceManager implementation used via
properies-file
3. Move methods in current implementatino from private to protected (to make
it reusable)

Also, another question - if I underastand - referencemanager during
initialization just updated and recreated it's information. It is required
in cases, then pages were changed during WikiEngine restarts (if I
understand correctly).

But, if it is not happens - I hope this refreshing is not required. So,
probably - allow to simple pass into ReferenceManager a flag, said - do we
need to refresh pages or not
It  should help us to save time during start dramatically (I hope)

Is all of these changes are OK? If yes - I may try to implement them and
send new version to community

-- 
With Best Regards,
Alexey Kakunin, EmDev Limited

Professional Software Development:
http://www.emdev.ru

Re: Reference Manager perfomance

Posted by Janne Jalkanen <ja...@ecyrd.com>.
> On emforge.org we have a quite big problem related to  
> ReferenceManager:
> actually, application start takes about 10-15 minutes, and most of  
> time it
> spent in ReferecenManager.initialize method (hm - how long  
> jspwiki.org takes
> to start?)

About a minute.  That's because the RefMgr actually caches the  
information after the first start.  Isn't your RefMgr doing so?

> Also, since most of methods/attributes of this class are private, I  
> cannot
> simple inherint my class from this implementation and reuse already
> implemented functionality.

This is correct; RefMgr was never meant to be replaced by users.

However, it has already been rewritten in 3.0.  In 3.0, we store the  
references directly into the repository as a part of page metadata,  
which means scanning is not required during startup.

> Also, another question - if I underastand - referencemanager during
> initialization just updated and recreated it's information. It is  
> required
> in cases, then pages were changed during WikiEngine restarts (if I
> understand correctly).

In 2.8 it only does so if it detects that the page has changed.  If  
you don't need this, I would just simply disable the check.

/Janne

Re: Reference Manager perfomance

Posted by Harry Metske <ha...@gmail.com>.
I think Janne can comment on your questions the best, a lot of this will
change in 3.0, but one quick check: are you reusing the refmgr.ser file in
JSPWiki's work directory ? (that can shorten startup times significantly)

Harry

2009/4/7 Alexey Kakunin <ak...@emdev.ru>

> Hi!
>
> On emforge.org we have a quite big problem related to ReferenceManager:
> actually, application start takes about 10-15 minutes, and most of time it
> spent in ReferecenManager.initialize method (hm - how long jspwiki.orgtakes
> to start?)
>
> Actually, I suppose it is because we have many (even sometimes empty) pages
> (becasue for each task wiki-page with description is created), and ,
> referenceManager is called
>
> // Refresh with the latest copy
> page = m_engine.getPage( page.getName() );
>
> for each page.
>
> I wanted to work on some reimplementation of ReferenceManager, but found,
> WikiEngine is used it directly (not via some Interface) - so, I cannot
> simple implement another implementation (like it is possible to do for
> PageProviders for example) and use it instead of default.
>
> Also, since most of methods/attributes of this class are private, I cannot
> simple inherint my class from this implementation and reuse already
> implemented functionality.
>
> So, I have some suggestions:
>
> 1. Define interface for ReferenceManager
> 2. Make it possible to control ReferenceManager implementation used via
> properies-file
> 3. Move methods in current implementatino from private to protected (to
> make
> it reusable)
>
> Also, another question - if I underastand - referencemanager during
> initialization just updated and recreated it's information. It is required
> in cases, then pages were changed during WikiEngine restarts (if I
> understand correctly).
>
> But, if it is not happens - I hope this refreshing is not required. So,
> probably - allow to simple pass into ReferenceManager a flag, said - do we
> need to refresh pages or not
> It  should help us to save time during start dramatically (I hope)
>
> Is all of these changes are OK? If yes - I may try to implement them and
> send new version to community
>
> --
> With Best Regards,
> Alexey Kakunin, EmDev Limited
>
> Professional Software Development:
> http://www.emdev.ru
>