[question] What's the overhead of having spy.create() in production?
See original GitHub issueTrying to decide whether to enable rxjs-spy in production. Ideally we would like to have it there in order to inspect our streams, but it doesn’t say much in the docs about how significant the overhead is.
The only code that would run in production is spy.create()
and tag()
on streams, but as far as I understand rxjs-spy
patches Observable.subscribe, so perhaps this isn’t very desirable.
Any thoughts on this? 😃
We’ve tried exposing spy.create in production, but the issue then is that if we create the spy later, we lose out on tagging a lot of streams that have already been created.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Finding performance bottlenecks in Celery tasks
Learn how to speed up Celery tasks by figuring out what's causing them to be slow.
Read more >A Unit Testing Practitioner's Guide to Everyday Mockito - Toptal
To create a spy, you need to call Mockito's static method spy() and pass it an instance to spy on. Calling methods of...
Read more >CS 419 Final Exam Study Guide
Disclaimer: This study guide attempts to touch upon the most important topics that may be covered on the final exam but does not...
Read more >How to Find Out the Bottleneck of My Python Code
More often than not, developers need to optimize the code to make it ... profiling has to be a continuous process in production...
Read more >What's the difference between a mock & stub? - Stack Overflow
Both mocks and stubs testing give an answer for the question: What is the ... Example: Your test class depends on a method...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s not mentioned because it’s not at all recommended. When it’s enabled/created everything runs through it. Everything.
tag
operators have essentially no overhead - as they are little more than annotations - but you definitely do not want tocreate
a spy in a production environment.Anyway,
rxjs-spy
is going to be deprecated soon and with its replacement - the RxJS DevTools I’m working on - you will be able to do what you want in a production environment with no overhead if the DevTools are not installed.… in a private repo.
I’ll be presenting a talk on the DevTools at RxJS Live - in Las Vegas - in September. Expect more information regarding the tools - and a beta release - to be made available around the time of the talk.