Skip to content
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

Convert the maps in the type file to simple arrays #1086

Merged
merged 7 commits into from
Jul 23, 2021

Conversation

jwinkler2083233
Copy link
Contributor

@jwinkler2083233 jwinkler2083233 commented Jul 22, 2021

Closes #1079

Description

This makes some changes to the 'map' objects in type.go, so that they are just simple arrays.


  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

Jeff Winkler added 3 commits July 21, 2021 23:01
This changeset will convert the maps of types to simple arrays
for performance reasons.
added some more defensive coding pieces
this has some changes from Bastian's WIP branch.
@turbolent
Copy link
Member

@jwinkler2083233 Can you please give this a proper title and make sure the remaining items are done?

runtime/parser2/type.go Outdated Show resolved Hide resolved
runtime/parser2/type.go Outdated Show resolved Hide resolved
runtime/parser2/type.go Outdated Show resolved Hide resolved
Co-authored-by: Bastian Müller <bastian@axiomzen.co>
@codecov-commenter
Copy link

codecov-commenter commented Jul 23, 2021

Codecov Report

Merging #1086 (9786ecf) into master (cd7a7a4) will increase coverage by 0.00%.
The diff coverage is 73.33%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1086   +/-   ##
=======================================
  Coverage   75.42%   75.42%           
=======================================
  Files         270      270           
  Lines       33181    33182    +1     
=======================================
+ Hits        25028    25029    +1     
  Misses       7017     7017           
  Partials     1136     1136           
Flag Coverage Δ
unittests 75.42% <73.33%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
runtime/parser2/expression.go 93.66% <57.14%> (ø)
runtime/parser2/type.go 85.00% <87.50%> (+0.03%) ⬆️

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 cd7a7a4...9786ecf. Read the comment docs.

@jwinkler2083233 jwinkler2083233 changed the title Jwinkler2083233/map to array Convert the maps in the type file to simple arrays Jul 23, 2021
runtime/parser2/type.go Outdated Show resolved Hide resolved
runtime/parser2/type.go Outdated Show resolved Hide resolved
jwinkler2083233 and others added 2 commits July 23, 2021 12:32
Co-authored-by: Bastian Müller <bastian@axiomzen.co>
Co-authored-by: Bastian Müller <bastian@axiomzen.co>
@jwinkler2083233
Copy link
Contributor Author

I ran an additional performance check after removing the items from the init() function. All is well on the performance front. Observation of expensive parsing methods is reduced dramatically.

Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

Looks good!

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.

Performance improvement by changing map to array type
3 participants