[TYPO3-mvc] eID, extbase, ajaxDispatcher, template not found

Stephan Schuler Stephan.Schuler at netlogix.de
Tue Jul 1 14:50:49 CEST 2014


Hey there.


I completely agree with Helmut.
eID can be really fast if you skip almost everything except e.g. database.

But as soon you need a tiny TYPO3 core feature, chances are that you end up with booting a nearly complete TYPO3 environment.

Think about e.g. TypoLink. There is no TypoLink without current TypoScript configuration and TSFE with loaded TSFE->id. There are many reasons for this, an obvious one is mount points.

TypoScript itself. It depends on various things, like e.g. frontend users and calculated user groups of frontend users. Just go through every available condition TypoScript has, like treelevel, TSFE:*, PidInRootline or usergroup. Everything needs to be calculated and available, just to even decide if the TypoScript is already available as cached array or needs to be parsed entirely.

Or any output for different languages. Language overlay records, overlay xlif or ll-xml files. It's a real paint to consider all of that yourself, so you most likely end up starting TSFE with an L argument.


Again: eID can be superfast and is awesome if it's a real low level task you want to do.
But as soon as you need a slightly advanced core feature you need to initialize just as much of TYPO3 as you get when using a dedicated page type or Helmuts extension.

Regards,




Stephan Schuler
Web-Entwickler

Telefon: +49 (911) 539909 - 0
E-Mail: Stephan.Schuler at netlogix.de
Website: media.netlogix.de



------------------------------------



--
netlogix GmbH & Co. KG
IT-Services | IT-Training | Media
Neuwieder Straße 10 | 90411 Nürnberg
Telefon: +49 (911) 539909 - 0 | Fax: +49 (911) 539909 - 99
E-Mail: info at netlogix.de | Internet: http://www.netlogix.de

netlogix GmbH & Co. KG ist eingetragen am Amtsgericht Nürnberg (HRA 13338)
Persönlich haftende Gesellschafterin: netlogix Verwaltungs GmbH (HRB 20634)
Umsatzsteuer-Identifikationsnummer: DE 233472254
Geschäftsführer: Stefan Buchta, Matthias Schmidt



-----Ursprüngliche Nachricht-----
Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org [mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von Helmut Hummel
Gesendet: Dienstag, 1. Juli 2014 12:38
An: typo3-project-typo3v4mvc at lists.typo3.org
Betreff: Re: [TYPO3-mvc] eID, extbase, ajaxDispatcher, template not found

Hi!

On 01.07.14 12:22, Chris Wolff - AERTiCKET AG wrote:

> the Typo3 Page Rendering ist slow. (if the result does not come from cache).

But it comes from cache after the first hit.

> As AJAX Responses Are usually not Cashable. You have to Deal with the whole typo3 Page rendering.

If the action itself isn't cachable, it does not mean that the rest cannot be cached.

> This means thinks like:
> * (Database Lookups for RealURL/CoolURI Lookup) if you don't call the
> Page by ID

Did you measure the overhead here? It was pretty low during my tests.

> * Initalising a lot of classes (typo3 Core).

Same here. Instantiating classes is pretty cheap.

> * Parsing Typoscript Tree.

Will be cached after first hit.

> * Initalizising the Extbase Framework

Well, if you need to call an Exbase action via Ajax, then this is of course a price you have to pay.

> * Initalizising the your Plugin. To render the Response.

Same here.

> eID On the Opposite:
> * initalisized the Pure minimum of Classes.
> * Loades your eID Class.

I know :)

> if your eID Script has some simple Tasks an is not Dependent on extbase it is superfast.

Well, yes of course.

> Like doing a simple SELECT statement on the database and return the result.

True. If you need to optimize that much or have a simple case where you do not need anything but a DB connection or a simple FE user, eID is the way to go; sure!

But *if* you need a page (TSFE) or even TypoScript, bootstrapping all this in your eID script is hard to get right. You end up with C&P almost all of the code in TSFE, which at best slows down your request to a regular page request level which never will be cached (so it is slow for every request), at worst you end up with broken code that will also break regular requests (as wrong things could get cached for your page).


Summary:
* Easy code with no dependencies: eID
* "Normal" code with dependencies to TypoScript: typoscript_rendering[1]

:)


Kind regards,
Helmut

[1]https://github.com/helhum/typoscript_rendering

--
Helmut Hummel
Release Manager TYPO3 6.0
TYPO3 Core Developer, TYPO3 Security Team Member

TYPO3 .... inspiring people to share!
Get involved: typo3.org
_______________________________________________
TYPO3-project-typo3v4mvc mailing list
TYPO3-project-typo3v4mvc at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc


More information about the TYPO3-project-typo3v4mvc mailing list