[TYPO3-core] RFC: #17592: ExtDirect API calls are splitted in single requests and slows down page loading

Rupert Germann rupi at gmx.li
Tue Feb 15 15:07:46 CET 2011


hi Steffen,

+1 by reading and testing.


I used our querycounter ext to check the amount of SQL queries needed 
for a simple BE reload:

before patch:
total: 87 queries

30	exec_PREPAREDquery
38	exec_SELECTquery
19	exec_UPDATEquery

different queries: 22


after patch
total: 44

15	exec_PREPAREDquery
20	exec_SELECTquery
9	exec_UPDATEquery

different queries: 18

still a lot but definetively a step in the right direction ;-)

greets
rupi




Am 15.02.2011 11:02, schrieb Steffen Kamper:
> This is an SVN patch request.
>
> Type: Bugfix
>
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=17592
>
> Branches:
> trunk, 4.5
>
> The API calls are splitted in single requests. They are included as
> script tags with
> <script src="ajax.php?ajaxID=ExtDirect::getAPI&namespace=TYPO3.XYZ" ...
>
> If you load the BE you have 6 single requests of these just to get the
> API, each request uses ajax.php and so have an own BE authentification
> using init.php. As they are script tags, they block the other scrupts
> from continue loading, and this takes a long time.
>
> The patch get rid of this technique completely, you now only have to add
> the ExtDirect code, and the API is rendered inline in document.
>
> There are 2 possibilities:
> a)
>
> $this->pageRenderer->addExtDirectCode();
>
>
> this includes all necessary javascript including all available
> namespaces start with TYPO3
>
> b)
>
> $this->pageRenderer->addExtDirectCode(array(
> 'TYPO3.EM',
> 'TYPO3.EMSOAP',
> 'TYPO3.ExtDirectStateProvider'
> ));
>
>
> this includes all necessary javascript including all defined namespaces
> in the array
>
> This patch is important for the BE performance. Here are a simple
> loadtime of resources with chrome on windows, reloading the BE
>
> without the patch:
> 383 requests ❘ 2.46MB transferred ❘ 2.51s (onload: 1.32s,
> DOMContentLoaded: 1.20s
>
> with the patch:
> 377 requests ❘ 104.22KB transferred ❘ 2.25s (onload: 1.04s,
> DOMContentLoaded: 911ms
>
> vg Steffen
>



More information about the TYPO3-team-core mailing list