Log in | Register | Lost password

Bottom
Access control improvements
  • Posted: 25.04.2003, 08:01
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    I'm currently working on the access control system for the templates (currently there's no access control on sub-folders - as used in the Gallery template).

    During that process I have thought a bit about the access control in general and I may have a solution to some of the performance problems. The access control works as follows:

    1) Get ALL folders the user has access to - this is a rather large SQL statement that joins PN core tables and Photoshare tables. I expect this to be the bottleneck.

    2) Cache the folder list (in memory during this PHP invocation)

    3) See if specific folder is in this list. If so then grant access.

    But when you show the thumbnails the system only displays one image per PHP invocation - so why spent time on retrieving the list of ALL folders when we always check only one of them?

    I'll try to rewrite the access control check such that it only checks for exactly one folder.

Template courtesy of Designs By Darren.