Find fast bug comparison method
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bug-repo-syncer |
Fix Released
|
Wishlist
|
Eike |
Bug Description
Compare the speed of the two bug comparison methods `equal_contents` and `make_bugs_
Result: `equal_contents` is slightly faster.
* Ratio ~ 0.7 for same number of equal and unequal bugs.
* Ratio ~ 0.3 (much faster) for only unequal bugs.
* Ratio ~ 0.95 for only equal bugs.
{{{
#!python
BUG_CONTENTS_FIELDS = list(set(
def equal_contents(bug1, bug2):
"""
Test if bugs are equal, but ignore fields that the repositories
always change. (ids, time_created, time_modified)
"""
for fname in BUG_CONTENTS_
if getattr(bug1, fname) != getattr(bug2, fname):
return False
return True
def make_bugs_
"""
Set bugs to neutral state, so that it can be compared.
TODO: copying two bugs for every comparison is a waste of resources
"""
return bug._replace(
}}}
Changed in bug-repo-syncer: | |
importance: | Undecided → Wishlist |
milestone: | none → 0.2.0 |
description: | updated |
summary: |
- dummy + Find fast bug comparison method |
summary: |
- Find fast bug comparison method + Duplicate test bug |
summary: |
- Duplicate test bug + Find fast bug comparison method |
Changed in bug-repo-syncer: | |
status: | New → Confirmed |
assignee: | nobody → Eike (eike-welk) |
status: | Confirmed → In Progress |
Changed in bug-repo-syncer: | |
status: | In Progress → Fix Released |
description: | updated |