Sniffs: fields the sniffs read from codecs / containers (Aac.adts, IsoBmff.sniff, Zstd.MAGIC, ...) copied once onto shared proxies, so detection loads no codec chunk; chunked build: a Detect chunk (Sniffs + what it requires); Brotli: static dictionary inflated on first reference (a trial decode no longer loads Deflate)
This commit is contained in:
1 parent
d64adc978f
commit
3468bfb49a
14 files changed
+8966
-5389
No files matched your search
+10
-1
@@ -249,7 +249,8 @@ def bundle_roblox():
|
||||
# module with no entry yet requires its chunk (require(script:FindFirstChild(name)); under the luau CLI, with no
|
||||
# `script`, require("@self/" .. name) over the same files in build/_modules/chunked/Rosetta). So requiring the root
|
||||
# loads Core (what the root runs at load time) and every other chunk on first use, per Actor.
|
||||
# Chunks: Core; one per hot codec (HOT); the rest packed per family (top folder, or codecs/<category>) in path order.
|
||||
# Chunks: Core; Detect (DETECT: what F.detect runs, apart from Core); one per hot codec (HOT); the rest packed per family
|
||||
# (top folder, or codecs/<category>) in path order.
|
||||
# A --!native module's functions get @native (a chunk can mix native and non-native modules); a chunk with no native
|
||||
# module has none. Outputs: build/Rosetta.rbxm (LZ4, written by model/rbxm under the luau CLI), build/Rosetta.rbxmx,
|
||||
# build/Rosetta.rbxm.linemap.json ({chunk: [[first line, source file], ...]}).
|
||||
@@ -257,6 +258,7 @@ CHUNK_SRC_MAX = 256 * 1024
|
||||
CHUNK_IR_MAX = 1 << 18
|
||||
CHUNK_ASM_MAX = 4 << 20
|
||||
CHUNKED = os.path.join(MODULES, "chunked", "Rosetta")
|
||||
DETECT = ["Sniffs"] # F.detect: Sniffs.luau and what it requires at load time (core/Sniff), one small chunk
|
||||
HOT = [
|
||||
("Mpeg2", ["codecs/video/Mpeg2", "codecs/video/Mpeg1", "codecs/video/Dsp"]),
|
||||
("H263", ["codecs/video/H263"]),
|
||||
@@ -331,6 +333,13 @@ def plan_chunks(mods):
|
||||
core.add(k)
|
||||
todo += sorted(eager(mods[k][0]))
|
||||
pack("Core", sorted(core))
|
||||
detect, todo = set(), [k for k in DETECT if k in left]
|
||||
while todo:
|
||||
k = todo.pop()
|
||||
if k in left and k not in detect:
|
||||
detect.add(k)
|
||||
todo += sorted(eager(mods[k][0]))
|
||||
pack("Detect", sorted(detect))
|
||||
for name, prefixes in HOT:
|
||||
keys = [k for k in left if any(under(k, p) for p in prefixes)]
|
||||
if not keys:
|
||||
|
||||
Reference in new issue
Block a user