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

Refactor locations #99

Merged
merged 9 commits into from
Dec 17, 2015
Merged

Refactor locations #99

merged 9 commits into from
Dec 17, 2015

Conversation

mattwynne
Copy link
Member

I think this is an improvement on the solution in #96, in that it's faster and seems to fit the existing model better.

@akostadinov could you give this a try please?

@mattwynne
Copy link
Member Author

Ref #97

@akostadinov
Copy link

Hello, I think that my solution was more of a patch than deeply integrated into cucumber logic. I tried to do as little modifications as possible and don't know cucumber code structure very well. So I'll be glad to give your solution a test and report back. Is there any link of a build with the patch or should I just grab the source?

@mattwynne
Copy link
Member Author

Hi @akostadinov it would be easiest if you can grab the source. You should be able to link to this branch in your Gemfile, something like this:

gem 'cucumber-core', git: 'https://github.com/cucumber/cucumber-ruby-core.git', branch: 'refactor-locations'

@erran-r7
Copy link

👍 This addition (pulled in via our Gemfile as pointed out by @mattwynne) resolves cucumber/cucumber-ruby#901 for one of our larger projects.

@akostadinov
Copy link

First thank you for the Gemfile tip. Didn't want to take your words for granted ;) so tested on our old (big) project.

Here are my observations. It takes around 30 seconds for a dry run which is awesome and is faster than my best hopes. Did a quick comparison with 1.3.19 and result was 0m35.991s. That's around 5 seconds slower.

Then I decided to factor out the time needed to go over each step and printing to console. So used a timer to measure how much time it takes between cucumber execution start and first output to console begins. For patched 2.x it takes ~10 seconds and for 1.3.19 it takes less than 16 seconds. That means ~20 seconds needed to go over each step and 10 seconds to select scenarios. This is an awesome achievement. Faster than 1.3 series by over 30% and ultimately works properly for huge projects.

Cheers!

P.S. would be nice if in the future cucumber prints out the time it took to select cases

@mattwynne mattwynne merged commit 8681d0b into master Dec 17, 2015
mattwynne added a commit that referenced this pull request Dec 17, 2015
@brasmusson brasmusson deleted the refactor-locations branch December 17, 2015 13:06
@mattwynne
Copy link
Member Author

OK I've just released v1.3.1 containing this fix. bundle update should pick it up.

@lock
Copy link

lock bot commented Oct 24, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants