-
Notifications
You must be signed in to change notification settings - Fork 135
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
Slow #107
Comments
Network call happens only when recording the data (first time), but method mocking (stubbing methods) on each replaying involves certain overheads. There would be rooms for improvement, but haven't been able to identify good ways. |
@parroty Would you mind elaborating a bit on where the speed problems ultimately reside? Is it in the mocking in meck itself? I'm asking, because it shouldn't be possible for one spec to interfere w/ another, and if you don't set clear_mock, they can. If it's possible to fix the speed, and make that the default behaviour, I think it'd be worthwhile. (I can try to help, but if you could direct me on what you alrady know about the problem, I'd appreciate it) |
I'm afraid that I haven't been able to investigate in detail. Profiling or something may be one approach. |
Hi, I'm also analysing the performance of ExVCR, in my case a test with ExVCR is about 20x times slower than a test without, 230ms vs 20ms. The tests with the 3 adapters are equally slow so I think it's in the shared code. I've tried some tools to get some indicators where to look to fix the performance problem. With Gist: https://gist.github.com/tompesman/7d15f60ccb3393cf929c608a5e081ea1 |
After some more research it looks like the |
Also really interested, some of my tests with only 2 requests take 500ms which should be almost instant when no database connections are being made. |
Has anyway found a work-around? |
I had the same issue with mocking, so instead mock for every cassette I implemented mocking on startup, see #158 With this workaround, an application that heavily uses cassettes now needs 120 seconds less to run |
I used mimic for mocking and I think it's way faster but it requires refactor of the app to allow for actual request |
What is causing it to be so slow? Is it exvcr itself or whatever vcr is using to intercept the network calls?
The text was updated successfully, but these errors were encountered: