User:HertzDevil/Notes

Performance
The slowest actions:
 * Cargo queries (~100-200 queries take one second)
 * Template expansion, especially with templates that query Cargo tables (implement no-Cargo variants in Lua)
 * Templates that simply wrap Lua modules, they also bump up the post-expand include size (invoke directly whenever possible)
 * Images (~300 images take one second)
 * Concatenating long strings in Lua (~ 1 second on long pages,  is more idiomatic and often leads to  )

Cargo

 * All joins are left outer joins
 * does not support  arguments that are too long (around 250 characters),   has no issues with those arguments
 * either returns a table or raises an error
 * Null fields are represented as empty strings in
 * Multiple  clauses on the same field, like , will always fail as they expand to

Binary

 * Files that contain reward payloads:
 * → Arena
 * → Allegiance Battles
 * → Use Heroic Grails
 * → Heroes' Path
 * → Quests and Missions
 * → Concert Hall
 * → Grand Conquests
 * → Forging Bonds
 * → Arena Assault
 * → Røkkr Sieges
 * → Aether Raids
 * → Aether Resort
 * → Aether Raids (first play bonus)
 * → Blessed Gardens
 * → Tempest Trials
 * → Squad Assault
 * → Chain Challenge
 * → Chain Challenge
 * → Special Maps
 * → Tactics Drills
 * → Story Maps, Paralogue Maps
 * → Tap Battle: Illusory Dungeon
 * → Voting Gauntlet
 * → Lost Lore

Replacing Cargo tables

 * Create a separate template whose only purpose is to declare B and store rows into B
 * Wherever rows are stored into A, store into B also
 * Regenerate B
 * Ensure A and B are equivalent
 * Convert all queries that use A to use B instead
 * Delete stores into A, A itself, and declaration of A
 * Move the contents of the transitional template into where A was declared
 * Delete the transitional template