Re: Deleting pages

"Reini Urban" <[email protected]>
Newsgroups gmane.comp.web.wiki.phpwiki.talk
Message-ID <[email protected]>
2008/4/11, Marc-Etienne Vargenau <[email protected]>:
>  Another question.
>
>  I have implemented a "real" remove item in menu for pages by using
>  the purgePage function in WikiDB.php (instead of deletePage).

I would call it action=purge, not remove.
remove should be undoable and it should be listed in RecentChanges,
purge might be visible in RecentChanges.

>  It works, but it is VERY slow (might be 2 minutes to delete a page).
>
>  Trying to debug the reason for this slowness we found the following.
>
>  The time is mostly spent is the following lines that seem useless:
>
>    $this->_update_recent_table();
>    $this->_update_nonempty_table();
>
>  You removed these lines here:
>
>  http://phpwiki.cvs.sourceforge.net/phpwiki/phpwiki/lib/WikiDB/backend/ADODB.php?r1=1.61&r2=1.62
>
>  in file lib/WikiDB/backend/ADODB.php

I didn't just remove these two functions. I've re-implemented them for ADODB
for the special case of remove, to speed it up.

A second speed improvement, removal of pending links, is only executed
with DEBUG,
and not thoroughly tested.

If the ADODB strategy works ok, we can do the same for PearDB.


>  We are using "PearDB.php"
>
>  Is it safe to delete these two lines in purge_page function in
>  file lib/WikiDB/backend/PearDB.php ?

No.
-- 
Reini Urban
http://phpwiki.org/              http://murbreak.at/

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.