-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat(reporter): Replace memoizee library with a trivial solution. #1618
feat(reporter): Replace memoizee library with a trivial solution. #1618
Conversation
There were the following issues with your Pull Request
Guidelines are available at http://karma-runner.github.io/0.13/dev/git-commit-msg.html This message was auto-generated by https://gitcop.com |
Looks good to me. @zzo for final review. |
0151c83
to
84fc013
Compare
please fix the (trivial) travis lint failure |
The reporter functionality was pulling the entire memoizee library with all its dependencies for a simple memoization solution, and using almost none of the functionality. This seems like not the most critically performant codepath. This PR replaces that with a good-case solution that lowers the dependency footprint.
84fc013
to
58340b1
Compare
Done. |
feat(reporter): Replace memoizee library with a trivial solution.
@DavidSouther I dont think it's correct fix. \cc @dignifiedquire @zzo |
Agreed, there is a reason a proper cache was used here instead of this simple solution. Also the weakMap solution should be much more memory efficient than this. Unless there is a good reason please revert this. |
@DavidSouther I really don't mind a couple of files of code, but the question is the actual memory and performance footprint lowered by this? If you are concerned with file size you can implement a version using a weakMap instead, but please not using a simple object. |
I believe the concern here is the dependency tree is large for this one module - I'll revert until we can find a better solution |
@zzo which I appreciate, but it shouldn't come at the cost of actual runtime behaviour and performance. |
agreed thanks for weighing in |
@zzo @dignifiedquire @maksimr Correct, I wanted this to remove the rather large memoizee dependency that's used in this one internal place. I totally misread the tests, and thought only the string sourcemap contents were being used here. Because engines is still 0.10 || 0.12, WeakMap would be inappropriate. This seems like not the most performance critical code - it will be called once per error in testing output. What do you all think about using the string form of the sourcemap? |
We are already including a shim for |
Ah, perfect! Should I re-open this PR, or start a new PR? |
Let's make it a new PR to have a clean slate (and I think Github gets confused otherwise) |
The reporter functionality was pulling the entire memoizee library with all its dependencies for a simple memoization solution, and using almost none of the functionality. This seems like not the most critically performant codepath. This PR replaces that with a good-case solution that lowers the dependency footprint.