Skip to content

Match or exceed v1 performance#580

Open
jhollinger wants to merge 49 commits into
release-2.0from
jh/release-2.0-faster
Open

Match or exceed v1 performance#580
jhollinger wants to merge 49 commits into
release-2.0from
jh/release-2.0-faster

Conversation

@jhollinger

@jhollinger jhollinger commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

After V1's recent perf improvements, V2 wasn't looking so great. These changes make V2 competitive again:

# Collection results (20 fields, 5 objects, 2 collections)
1,000 widgets 100x: V2 change: -59.72%
500 widgets 100x: V2 change: -60.23%
250 widgets 100x: V2 change: -60.50%
100 widgets 100x: V2 change: -61.48%
25 widgets 100x: V2 change: -62.42%
5 widgets 100x:  V2 change: -60.14%
1 widgets 100x:  V2 change: -54.12%

# Object results (20 fields, 5 objects, 2 collections)
1,000 widgets 100x: V2 change: -32.68%
500 widgets 100x: V2 change: -33.49%
250 widgets 100x: V2 change: -32.39%
100 widgets 100x: V2 change: -35.35%
25 widgets 100x: V2 change: -36.85%
5 widgets 100x:  V2 change: -54.16%
1 widgets 100x:  V2 change: -52.25%

Some major changes include:

  • The DSL now builds what is essentially an AST that's evaluated on first render or reflection. Among other things, this allows use to behave like a macro within the DSL.
  • around_blueprint_init can now modify blueprint options and field details.
  • Lots of "legacy" extensions to east the transition. Covers legacy if/unless options, extractors, transformers, dynamic options, and more.
  • Documentation branch: jh/release-2.0-docs

@jhollinger jhollinger force-pushed the jh/release-2.0-faster branch 4 times, most recently from cf26f1a to 43f7db0 Compare April 16, 2026 19:21
@jhollinger jhollinger closed this Apr 18, 2026
@jhollinger jhollinger reopened this Apr 18, 2026
@jhollinger jhollinger changed the title Match v1 performance Match or exceed v1 performance Apr 18, 2026
@jhollinger jhollinger force-pushed the jh/release-2.0-faster branch 18 times, most recently from 98b34e4 to 5841499 Compare April 22, 2026 20:18
@jhollinger jhollinger marked this pull request as ready for review April 22, 2026 20:27
@jhollinger jhollinger requested review from a team and ritikesh as code owners April 22, 2026 20:27
@jhollinger jhollinger force-pushed the jh/release-2.0-faster branch from e83ea61 to b3d8412 Compare April 24, 2026 20:48
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
@jhollinger jhollinger force-pushed the jh/release-2.0-faster branch 2 times, most recently from b5543f8 to a5cf165 Compare May 22, 2026 20:22
…result hook to run, so that it's easier for other extensions to decorate the result before it's JSONified

Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
…eprint's views from V2

Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
…d Procs

Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
@jhollinger jhollinger force-pushed the jh/release-2.0-faster branch from a5cf165 to c065be7 Compare May 26, 2026 19:20
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
@jhollinger jhollinger force-pushed the jh/release-2.0-faster branch 7 times, most recently from b9d79a6 to 2dc9670 Compare June 2, 2026 14:53
- No longer need `use!` since `use` is now positional.
- The DSL now builds a series of nodes which are evaled later.
- Replace `view`'s `empty` arg with the `exclude_all` DSL method.
- Options and extensions are now blocks (so they can interact properly with other DSL nodes)

Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
…DSL methods

Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
…artials can be inherited

Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
@jhollinger jhollinger force-pushed the jh/release-2.0-faster branch from 2dc9670 to 6e5c009 Compare June 3, 2026 14:11
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
…hods in V2::Base

Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
…ir own views in associations (without using a Proc).

Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
…xtensions

Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
…icated methods

Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
…d/missing partials.

Helpful because the `use` could be located in a parent Blueprint, parent view, or a nested `use`.

Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
…ents from partials.

`exclude` now only works on inheritance. `use` has its own exclusion arguments.

Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants