Commit Graph

8 Commits

Author SHA1 Message Date
b6b1fe75fc make_game assets: start the BCPack follow-ups with the most pixels to decode
The pass ran the largest source pools first, but a pool's file size says little about its follow-up time: on the
retail package the slowest pool (467 s alone) is a 0.79 GiB one with 1,038 candidate rows, while each 2.5 GiB
terrain pool has ~250 and takes 280-400 s. Started 34th of 52, it ran alone for the last five minutes.

follow_cost() counts the pixels of the rows complete_pool() decodes (the rows ttpf_assets.candidate accepts), 0 for
a pool the pass already stamped, from the manifests assets() reads anyway: the completeness check before the
exports and the one after each export. Only the number is kept; the worker reads its manifest again.

Over the 52 pools measured, the pixel count ranks the serial times with Spearman 0.82 (source size 0.44). On a
replay of the pass with 12 workers it brings the pass from 927 s to 624 s, the time of the slowest pool alone; the
output is byte-identical to the serial build's.
2026-11-25 14:52:12 -03:00
740445ab62 make_game assets: BCPack follow-ups in worker processes, largest first
On top of tedin7's change, for the follow-up pass (ttpf_assets.complete_pool):

- Each worker reads its own pool's manifest (follow_pool), so the build no
  longer parses every pool's catalog before the pass, holds them all at once
  or pickles one to each worker.
- The largest pools start first, so the longest one doesn't run alone at
  the end. Log lines still come in pool order once the pass is done.
- Progress ticks as each pool finishes. After a failure the pools not
  started yet are dropped and the earliest failure in list order is raised.
- The budget is the stage's: --jobs, or its share when the assets stage
  runs beside the shaders stage; at most 61 workers on Windows
  (ProcessPoolExecutor's limit).

The archive and pool exports run one at a time again, each with the whole
budget: one rpf9dump ttpf export already keeps about 3/4 of 24 cores busy
and peaked at 8.2 GiB here, so side-by-side exports would add memory for
little time.
2026-11-25 14:52:12 -03:00
fd19cb2a7c make_game: run asset exports and pool follow-ups on --jobs workers, results in order 2026-11-25 14:52:00 -03:00
fcc0eb7705 make_game: a broken bcpack calibration profile is one ERROR line, not a JSON traceback (EGEN-TTPF-CALIB-PROFILE-BADJSON) (#6827)
Squash-merged after diff review of PR #6827 - make_game: a broken bcpack calibration profile is one ERROR line, not a JSON traceback (EGEN-TTPF-CALIB-PROFILE-BADJSON)
2026-11-23 09:51:40 -06:00
12ada29a3c make_game: export texture pools again when the decoder changed
BUILD-866 gave the model and texture exports a decoder.sha256 record.
The texture-pool loop still took any complete pool manifest.json as
done, although rpf9dump ttpf decodes with the same rpf9-explorer Core
and keeps the DDS files it finds. After a submodule or tools/rpf9dump
change, assets/ttpf/** and assets/ttpf_pack/** kept the old decoder's
output.

Each pool folder now gets the same record, written before its export.
A folder with another record, or without one, is removed and exported
again, as the model and texture folders are.
2026-11-22 20:45:45 -03:00
aee179fdaa make_game: export models and textures again when the decoder changed (BUILD-866)
The assets stage skipped rpf9dump models|textures whenever a manifest.json existed, so a work folder kept the
old decoder's output after the rpf9-explorer pin or tools/rpf9dump changed. A digest of both is now written
beside each manifest; a folder with another digest or without the record is removed and exported again, as the
shaders stage does for the translator.
2026-11-22 20:27:01 +01:00
a7f2bb339a test_make_game_assets_pools: use native separators in pool paths
os.path.join with a forward-slash relative path kept the slashes on Windows while make_game's os.walk returns backslashes, so the source paths did not compare equal.
2026-11-22 19:13:28 +05:30
114000eadc make_game: export both pools when texture basenames collide
rpf9dump names a pool's output folder after the source basename, so two pools with the same basename in one destination namespace shared a manifest and the second silently produced no DDS. Colliding pools now get a stable per-source export root; unique pools keep their existing folder and are not re-exported.
2026-11-22 17:59:51 +05:30