Project

General

Profile

Actions

Feature #34922

closed

Allow .ts file extension for static typoscript templates

Added by Sebastian Michaelsen about 12 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
Start date:
2012-03-16
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
medium
Sprint Focus:

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.


Files

34922.diff (4.96 KB) 34922.diff Sebastian Michaelsen, 2012-03-16 13:44
Actions

Also available in: Atom PDF