[pmwiki-users] pagelist with RecentChanges trail : how to get rid of deleted pages which are listed ?

ABClf languefrancaise at gmail.com
Fri Oct 29 20:02:06 PDT 2021


Test done ;
indeed, improved code is quite faster.
For the test pagelist I have used, result is :
872: 02,98 now (to be compared with older 23420: 09,42).
I will have to do some thinking about what I want to do, and how fast.
Thank you Petko.


Le ven. 29 oct. 2021 à 17:23, Petko Yotov <5ko at 5ko.fr> a écrit :
>
> Next version should be released early next month, but you can already
> try the pre-release now -- get it from the PmWiki/ChangeLog page. Only
> pmwiki.php has changes related to this.
>
> It already has the "if exists" optimization, which on large pagelists
> may improve the stopwatch times by a factor of 10 or more. It is still
> case-insensitive, and this is unlikely to change in the core, but will
> allow a local configuration to override it or add a new one.
>
> Petko
>
> On 29/10/2021 16:05, ABClf wrote:
> > Thank you Petko ;
> > One, I believe I have used if="exists {=$FullName}" parameter with
> > defective syntax, and obviously failed in getting the expected result.
> >
> > Two, since I want to collect recently changed pages among several
> > groups in one shot, using fmt for grouping the output, I use
> > trail=Site.AllRecentChanges group=Group1,Group2,Group3. Might not be
> > cost effective, yet it looks like it's working decently.
> >
> > if="exists {=$FullName}" param can not be used in such a long pagelist
> > case ; with this parameter on, pagelist does too much for work, giving
> > :
> > 23420: 09,42 (using if exists)
> > 460: 00,52 (without if exists).
> >
> > I will try with the next version.
> > Gilles.
> >
> >
> > In my case I don't mind about case.
> >
> >
> >
> > Le dim. 24 oct. 2021 à 10:54, Petko Yotov <5ko at 5ko.fr> a écrit :
> >>
> >> The most efficient should be this:
> >>
> >>    (:pagelist group=Main trail=Main.RecentChanges if="exists
> >> {=$FullName}":)
> >>
> >> group=Main is recommended if your pages are all from the same group.
> >>
> >> I just found out that the "exists" conditional can be optimized a lot,
> >> especially when called multiple times from a pagelist. This will be
> >> released in the next version in a few days.
> >>
> >> One other note, the "exists" conditional is case insensitive, like the
> >> "name" and "group" conditionals, but unlike "match". This means if we
> >> test for deleted pages "Wikisandbox" and "WikiSandBox", but there is
> >> the
> >> correct page "WikiSandbox", it will return true:
> >>
> >>    https://www.pmwiki.org/wiki/Test/CondExists2
> >>
> >> I wouldn't want to change the current state and risk breaking existing
> >> wikis relying on the case insensitivity, but in your situation this
> >> can
> >> be clearly wrong.
> >>
> >> I'll have to think about what to do. Possibly adding a new conditional
> >> for "case-sensitive exists" or a way to configure the current one to
> >> be
> >> case sensitive. Let's think about it.
> >>
> >> Petko
> >>
> >> --
> >> If you upgrade :  http://www.pmwiki.org/Upgrades
> >>
> >>
> >> On 22/10/2021 16:04, ABClf wrote:
> >> > I have a pagelist using a RecentChanges as trail source ;
> >> > page which have been deleted does appear in the RecentChanges trail (I
> >> > believe it's the normal behaviour) ; thus they also get listed in
> >> > pagelist result.
> >> > I don't know how to get rid of the deleted pages ; I believe I have
> >> > use the (:if exists:) param or set up a special list= parameter.
> >> > How would you do ?
> >> > Thank you,
> >> > Gilles.
> >



More information about the pmwiki-users mailing list