Issue Feature Closed

#34922Allow .ts file extension for static typoscript templates

Sebastian Michaelsen 03/16/12, 12:15 updated 10/19/17, 21:37

Description

At the moment the following static typoscript filenames are allowed:

setup.txt
constants.txt
include_static.txt
include_static_files.txt

My intention is to also allow “.ts” as file extensions because they’re commonly used and IDEs can recognize those file as TypoScript.

I was already playing around with the code and what makes me worry is performance. It’s quite expensive to check all the allowed filenames and read them.

I benchmarked different situations (folder with only .txt / only .ts / both / none) and in average it slows down the reading of static templates by about 48%. I don’t know if this is acceptable in change for the convenience you get.
Maybe there’s a possibility for a smart caching solution or other ideas on improving the performance. Ideas are welcome.

I will add my best effort patch here shortly.

Reviews 1