Skip to content

flags@4.0.6

Latest

Choose a tag to compare

@github-actions github-actions released this 03 Apr 11:33
1ac8390

Patch Changes

  • c08f3e5: Improve performance by caching next/headers imports.

    Previously every flag evaluation in Next.js App Router would run
    await import("next/headers"). The imported module is cached by
    the runtime, but we would still go through the event loop unnecessarily.

    Now we cache the resolved module in a local variable so only the
    first call awaits the dynamic import; subsequent calls skip the
    microtask entirely.

  • c08f3e5: Reduce microtask queue overhead in flag evaluation by replacing the async IIFE around decide() with a direct call and Promise.resolve().