Preparing search index...

    Function generatePerformanceRecipes

    • Generates deterministic recipes drawn from existing ingredient and tag pools.

      Every embedded ingredient and tag is copied (by id and name) from the supplied pools, guaranteeing referential integrity with the database seed. Recipe field values vary realistically — ingredient counts (3–20), prep-step counts, servings and nutrition — so list rendering is genuinely stressed.

      Images are assigned by cycling imagePool, which must contain only filenames that are actually bundled and copied at seed time (see copyDatasetImages / testRecipesImages). This keeps every generated recipe pointing at a real image so image-decode cost is represented in the performance measurement.

      Curated anchor recipes are expected to be prepended by the caller; ids start at startId and increase by one with no gaps or duplicates.

      Parameters

      • count: number

        Number of recipes to generate.

      • ingredientPool: readonly ingredientTableElement[]

        Full ingredient pool (anchors + generated) to draw from.

      • tagPool: readonly tagTableElement[]

        Full tag pool (anchors + generated) to draw from.

      • imagePool: readonly string[]

        Non-empty list of bundled image filenames to cycle through.

      • startId: number

        First id to assign (anchors occupy ids before this).

      Returns recipeTableElement[]

      An array of count generated recipes.

      const recipes = generatePerformanceRecipes(1199, ingredients, tags, images, 2);