[TYPO3-core] RFC: #17592: ExtDirect API calls are splitted in single requests and slows down page loading
Steffen Kamper
info at sk-typo3.de
Tue Feb 15 11:02:56 CET 2011
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
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 17592.patch
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20110215/87451f6c/attachment.txt>
More information about the TYPO3-team-core
mailing list