Closed
Bug 466929
Opened 16 years ago
Closed 16 years ago
[silme] add has_entity() to diff/l10nobject.py and diff/entitylist.py
Categories
(Mozilla Localizations :: Infrastructure, defect)
Mozilla Localizations
Infrastructure
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: adriank, Assigned: adriank)
References
Details
Attachments
(2 files, 1 obsolete file)
888 bytes,
patch
|
zbraniecki
:
review-
|
Details | Diff | Splinter Review |
720 bytes,
patch
|
zbraniecki
:
review+
|
Details | Diff | Splinter Review |
From an IRC discussion with Gandalf: would be nice to have that methods.
L10nObjectDiff.hasEnity() is implemented in the same way like L10nObjectDiff.getEnity(), which is really slowing down Silme, if used.
But if someone will need to have that...
Attachment #350255 -
Flags: review?(gandalf)
Assignee | ||
Comment 1•16 years ago
|
||
Attachment #350256 -
Flags: review?(gandalf)
Comment 2•16 years ago
|
||
Comment on attachment 350256 [details] [diff] [review]
add hasEntity() to L10nObjectDiff
nope, it's part of the lib, we have to have a full featured code for iterating through elements and seeking for entity.
Attachment #350256 -
Flags: review?(gandalf) → review-
Comment 3•16 years ago
|
||
Comment on attachment 350255 [details] [diff] [review]
add hasEntity() to EntityListDiff
One liner is better here
def hasEntity(self, id): return self.has_key(id)
Attachment #350255 -
Flags: review?(gandalf) → review-
Assignee | ||
Comment 4•16 years ago
|
||
changed according to review in comment #3
Attachment #350255 -
Attachment is obsolete: true
Attachment #350924 -
Flags: review?(gandalf)
Comment 6•16 years ago
|
||
Comment on attachment 350924 [details] [diff] [review]
(v2) add hasEntity() to EntityListDiff
the patch needs an update, but r+ of course :)
Attachment #350924 -
Flags: review?(gandalf) → review+
Comment 7•16 years ago
|
||
At least EntityListDiff.has_entity, not sure about L10nObjectDiff
Summary: [silme] add hasEntity() to diff/l10nobject.py and diff/entitylist.py → [silme] add has_entity() to diff/l10nobject.py and diff/entitylist.py
Comment 8•16 years ago
|
||
http://hg.mozilla.org/users/zbraniecki_mozilla.com/silme/rev/48e6eaa65a63
http://hg.mozilla.org/users/zbraniecki_mozilla.com/silme/rev/4c3bb0affa8d
done for entitylistdiff. Leaving the bug open for L10nObjectDiff
Assignee | ||
Comment 9•16 years ago
|
||
Gandalf: L10nObjectDiff.has_entity() will need (nearly) the same code like for get_entity():
"L10nObjectDiff.get_entity() should be less time consuming (better not to do get_entitylistdiff which does get_entities to get one single entity...)" for Silme 0.7 ( https://wiki.mozilla.org/Silme:0.7 )
Nominating for 0.7.
Blocks: 495229
Comment 10•16 years ago
|
||
Fixed: http://hg.mozilla.org/users/zbraniecki_mozilla.com/silme/rev/fe0675299497
The performance is a material for a separate bug. I improved it by 30%, and I expect we can get another 30% but it'll still be pretty slow (bare in mind we have to find both, added and removed to mark it as "modified" in get_entity. In has_entity we can skip it)
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•