-
Notifications
You must be signed in to change notification settings - Fork 487
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
Add memoizaion for getConfig #679
Add memoizaion for getConfig #679
Conversation
Signed-off-by: Mykhailo Semenchenko <mykhailo.semenchenko@logz.io>
Codecov Report
@@ Coverage Diff @@
## master #679 +/- ##
==========================================
+ Coverage 94.23% 94.26% +0.03%
==========================================
Files 228 228
Lines 5930 5931 +1
Branches 1492 1492
==========================================
+ Hits 5588 5591 +3
+ Misses 304 302 -2
Partials 38 38
Continue to review full report at Codecov.
|
@@ -59,6 +59,7 @@ describe('getConfig()', () => { | |||
let getJaegerUiConfig; | |||
|
|||
beforeEach(() => { | |||
getConfig.apply({}, []); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is reset memoization cache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx. I wish they would've fixed that ticket by adding an explicit method like reset(), much better for readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
I don't think #678 requires re-evaluation. As long as I can have a function stored in a config key, it should be fine. |
Signed-off-by: Mykhailo Semenchenko <mykhailo.semenchenko@logz.io> Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
Signed-off-by: Mykhailo Semenchenko <mykhailo.semenchenko@logz.io> Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
Signed-off-by: Mykhailo Semenchenko <mykhailo.semenchenko@logz.io> Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
Which problem is this PR solving?
getConfig()
runShort description of the changes
getConfig()