Skip to content

Conversation

jlward
Copy link
Contributor

@jlward jlward commented Nov 4, 2013

If a table has a large number of cells then we call find_all on that table n times where n is the number of cells in the table. Add simple memoization to prevent this from happening.

@ghost ghost assigned jlward Nov 4, 2013
@@ -478,7 +485,20 @@ def _should_parse_next_as_content(el):
# Create the actual li element
return self.list_element(parsed)

def get_tcs_in_column(self, tbl, column_index):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably go back to this being _get_tcs_in_column

@winhamwr
Copy link
Contributor

winhamwr commented Nov 5, 2013

Looks good other than the minor naming change.

jlward added a commit that referenced this pull request Nov 5, 2013
Performance issue on large tables with many table cells
@jlward jlward merged commit 094df92 into master Nov 5, 2013
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward added a commit that referenced this pull request Mar 14, 2014
Performance issue on large tables with many table cells
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward added a commit that referenced this pull request Mar 14, 2014
Performance issue on large tables with many table cells
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants