[TYPO3-dev] TCEforms suggest fails on large sites
Steffen Gebert
steffen at steffen-gebert.de
Sat Sep 12 12:48:13 CEST 2009
On Sat, 12 Sep 2009 10:25:39 +0200, Rupert Germann <rupi at gmx.li> wrote:
> thanks for bringing this up.
> I also encountered some performance issues when function queryTable() is
> forced to loop itself because the be_user has no rights to see the found
> records.
> I see some optimization potential here.
>
> e.g. we could use the pagePermsClause directly in the query instead of
> sorting out already fetched records by PHP. I'm shure mysql can do this
> faster and we would get rid of the recursion.
Hi Rupert,
permissions of the page itself are checked and added to the MySQL query:
if ($this->table == 'pages') {
$this->addWhere = ' AND ' . $GLOBALS['BE_USER']->getPagePermsClause(1);
}
Pages outside the user's DB mount are sorted out by
checkRecordAccess() calling t3lib_BEfunc::readPageAccess().
But I'm also not so happy with so many recursive calls. Maybe we could
increase the LIMIT exponentially each call?
Another idea could be to set $config['pidList'] to the mount point IDs, as
then search directly all subpages are added as condition (which might be a
no-go for huge file mounts and admins... so this should be configurable..
but also not really nice).
I didn't test the suggest feature on a table other than "pages". So don't
know, how effective it's handled there.
Steffen
P.S.: In t3lib_BEfunc::readPageAccess() there seems to be a little bug:
Usually page tree stops at pages without read permissions.
readPageAccess() returns true for subpages of such pages (but this is a
different issue..).
More information about the TYPO3-dev
mailing list