Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Lettuce takes a long time to execute #369

Open
hectord opened this Issue · 2 comments

2 participants

Hector Davensburg Gabriel Falcão
Hector Davensburg

When a file is 20K big, lettuce takes a long time to execute even when we select only one scenario using a tag.

A good example is the following feature: https://gist.github.com/hectord/6196436 with 36 scenarios. It takes around 2 minutes to execute only one scenario (wip1 or wip2).

lettuce -t wip1

I'm not 100% sure but I think that this problem comes from the method _find_tags_in executed on each scenario which performs a search on the whole file. Because of that, the execution time is in O(n^2) where n is the number of scenarios.

Hector Davensburg hectord referenced this issue from a commit in hectord/lettuce
Hector Davensburg hectord Extract tags for each scenario by the Feature.
The previous option (using a regex search in the whole
 file to look for tags in each new scenario) was quite
 slow.

This commit is especially interesting for projects with
 feature file of more than 20K.

This commit closes the issue #369.
889b0ba
Hector Davensburg hectord referenced this issue from a commit in hectord/lettuce
Hector Davensburg hectord Extract tags for each scenario by the Feature.
The previous option (using a regex search in the whole
 file to look for tags in each new scenario) was quite
 slow.

This commit is especially interesting for projects with
 feature file of more than 20K.

This commit closes the issue #369.
ab61ec4
Gabriel Falcão

My good friend @clarete is working on a pure python implementation of gherkin

Gabriel Falcão

So it's not worth to improve any code related to parsing yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.