Match or exceed v1 performance#580
Open
jhollinger wants to merge 35 commits into
Open
Conversation
cf26f1a to
43f7db0
Compare
98b34e4 to
5841499
Compare
e83ea61 to
b3d8412
Compare
…rnal but prefix private fields with an "_" Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
…lds` Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Will make if/unless/default/etc options Procs and field blocks behave more similarly to V1's. They can still access the Blueprint instance through `ctx`. Format blocks still use instance_exec, b/c otherwise they couldn't access the Blueprint. And that's new functionality so no compatibility concerns. Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
…il after that hook runs Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
…sn't make sense to allow classes or procs Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
… place now Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
…e time/memory) Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
…round_blueprint_init. Use a single field type for fields, objects, and collections. Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
…tion for collections) Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
…r inclusion is changed Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
…value as 2nd arg (so that ctx is always first arg) Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
…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>
26deee8 to
b5543f8
Compare
…d Procs Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
b5543f8 to
a5cf165
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After V1's recent perf improvements, V2's perf was no longer looking so good. These changes make V2 competitive again:
Perf varies with the number of fields, objects, and collections. It can also vary between the top-level serialization being a collection or object (collections are faster b/c some overhead is shared across loops). Use of extensions also caries some overhead (none were used in the measurements below).
One thing we lost here is the ability to have extensions that are initialized per-render. I think it's possible to add again, but it will be more complicated, so IMHO we should wait until someone needs it.
Some other changes include:
fieldsDSL method to receive options and a blockfromoption tosource(reads better)around_blueprint_initto modify blueprint options and field details (previously it could only change field order or filter out fields)