Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add caching to custom_func javascript to boost perf (see benchmark results) #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
jf-tech merged 4 commits into master from jsbench
Sep 28, 2020

Conversation

@jf-tech
Copy link
Owner

@jf-tech jf-tech commented Sep 27, 2020

No description provided.

Copy link

codecov bot commented Sep 27, 2020
edited
Loading

Codecov Report

Merging #67 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@ Coverage Diff @@
## master #67 +/- ##
=========================================
 Coverage 100.00% 100.00% 
=========================================
 Files 29 29 
 Lines 1225 1257 +32 
=========================================
+ Hits 1225 1257 +32 
Impacted Files Coverage Δ
customfuncs/customFuncs.go 100.00% <ø> (ø)
customfuncs/javascript.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9c017ae...d5b4e82. Read the comment docs.

Copy link
Collaborator

@liangxibing liangxibing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

...oid unnecessary JSONify of contextual node which is pretty expensive; also address PR comment
Copy link
Owner Author

jf-tech commented Sep 28, 2020

@liangxibing @wangjia007bond any more comments? I did a split on javascript into javascript and javascript_with_context after PR approval. The rationale is: given javascript perf is good (with caching) so we can now deprecate eval; for vast majority use scenarios of eval and javascript, the node JSON serialization isn't needed thus why not save some time/resources and only do _node context when schema author chooses javascript_with_context. I also thought about doing some string/AST parsing to determine if the script contains reference to _node or not and auto choose node JSON serialization. But then I decided it's a bit too much over-engineering, just let schema author to choose.

@jf-tech jf-tech merged commit 71ae1cf into master Sep 28, 2020
@jf-tech jf-tech deleted the jsbench branch September 28, 2020 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@wangjia007bond wangjia007bond wangjia007bond approved these changes

@liangxibing liangxibing liangxibing approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /