Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A warning should be added to difflib documentation about SequenceMatcher performance #106865

Open
Assignees
tim-one
Labels
docsDocumentation in the Doc dir
@maathieu

Description

@maathieu

Documentation

Some functions ofdifflib.SequenceMatcher perform very poorly in real-world scenarios (for example get_opcodes() takes several minutes to return a list of tuples for two identical files that are 70kb long). This is reported in different places online, such as onStackOverflow.

It would be nice to add a note about the performance in the doc, with possible workarounds (for example there is a great performance improvement if one opens the files with readlines() and compares two lists of lines, instead of opening files with read() and compare two strings).

Thanks :-)

Linked PRs

Metadata

Metadata

Assignees

Labels

docsDocumentation in the Doc dir

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2026 Movatter.jp