Fire Emblem Heroes Wiki
Advertisement

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, table.concat is more idiomatic and often leads to List.map)

Cargo[ | ]

  • All joins are left outer joins
  • #cargo_query does not support field arguments that are too long (around 250 characters), mw.ext.cargo.query has no issues with those arguments
  • mw.ext.cargo.query either returns a table or raises an error
  • Null fields are represented as empty strings in mw.ext.cargo.query
  • Multiple HOLDS clauses on the same field, like Properties HOLDS 'a' AND Properties HOLDS 'b', will always fail as they expand to __Properties._value='a' AND __Properties._value='b'

Binary[ | ]

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
Advertisement