[pmwiki-users] Question regarding slow page loading with attr set

Hans Bracker design at softflow.uk
Sun Apr 14 07:02:12 PDT 2024


Hello Petko,

Sunday, April 14, 2024, 1:42:14 PM, you wrote:
> Maybe we can add a new function optimized for checking permissions only, that will return neither the page text nor the history, but will cache the page attributes so that they could be re-checked for different levels without reopening the page. But if the password verification takes most of the time, the improvements may not be noticeable.

That sounds good to try! Ideally some functionality along the line page text variables get cached: i.e. perhaps one (:if auth :) markup, or one call to 
CondAuth will cache all the authorisations for all the levels, so we need fewer page reads. 

You were right, I had five (:if auth ... :) conditionals for five different levels. Reducing these to one level does indeed reveal that it gets cached. But there is still a big difference in speed, compared to a page without page attributes. So the checking of those is the real time waster, not the opening and reading of the page. 
I know nothing about how passwords get verified in this process, how that can get sped up.

You wrote before that the auth level caching only works for calls from markup. But I can use calls to CondAuth() in my recipe script with an extra parameter, to ask for caching, like: CondAuth($pagename, 'edit', 1) ? That should be okay? I have been using four calls in foxcsv.php in the function building a template automatically.

cheers and thanks,
Hans




More information about the pmwiki-users mailing list