Issue Task Under Review

#110991Register default frontend JavaScript directly

Wouter Wolters 10/09/26, 16:40 updated 11/10/26, 12:27

Description

Protected email links and JavaScript window links register the default
frontend JavaScript. Exporting it to typo3temp reads the source and
hashes its contents on every registration, even when the exported file
already exists.

Register the packaged asset directly and let the existing resource
publisher generate its URL and apply modification-time cache busting.
This removes the source reads, content hashing and temporary export.
Disabling default JavaScript and merging asset attributes and options
continue to work as before.

Registration costs decrease as follows:

Registrations   Source reads      Time before / after
1 1 -> 0 37.73 / 0.48 us
20 20 -> 0 581.32 / 7.08 us
100 100 -> 0 2985.30 / 34.82 us

These timings cover registration, not the complete frontend request.
Peak allocations for repeated registration fall from 13,848 to 1,680
bytes. Rendering still checks file metadata for cache busting.

Reviews 1

History 03