Closed
Bug 897780
Opened 12 years ago
Closed 11 years ago
Wasted work in SuggestMgr::twowords()
Categories
(Core :: Spelling checker, defect)
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: pchang9, Assigned: pchang9)
References
Details
(Keywords: perf, Whiteboard: [fixed-in-hunspell-1.3.3])
Attachments
(3 files)
1.35 KB,
patch
|
Details | Diff | Splinter Review | |
1.16 KB,
patch
|
Details | Diff | Splinter Review | |
1.22 KB,
patch
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0 (Beta/Release)
Build ID: 20130116073211
Steps to reproduce:
The problem appears in changeset 138350:18467a85acf6. I have attached a simple one-line patch that fixes it.
In method SuggestMgr::twowords() in extensions/spellcheck/hunspell/src/suggestmgr.cpp, the loop on line 818 and 834 should break immediately after "cwrd" is set to "0". All the iterations after "cwrd" is set to "0" do not perform any useful work, at best they just set "cwrd" again to "0".
Attachment #780728 -
Flags: review?(pchang9)
Updated•12 years ago
|
Component: Untriaged → Spelling checker
Product: Firefox → Core
Similar problems appear in the same file on loops at line 163 and 421, where they should break after "cwrd" is set to "0" (patch2.diff); On loops at line 1385 and 1414, the loops should break after "unique" is set to "0" (patch3.diff).
Attachment #780736 -
Flags: review?(pchang9)
Attachment #780737 -
Flags: review?(pchang9)
Comment 4•12 years ago
|
||
pchang, better to request review from Caolan since he's an upstream Hunspell maintainer. But like Gavin said, these are all in an upstream library, so filing bugs there is probably a better idea.
Comment 5•12 years ago
|
||
looks good, committed to upstream HEAD now
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•12 years ago
|
Whiteboard: [fixed-in-hunspell-1.3.3]
Updated•11 years ago
|
Depends on: hunspell-1.3.3
Updated•11 years ago
|
Attachment #780728 -
Attachment is patch: true
Attachment #780728 -
Flags: review?(pchang9)
Updated•11 years ago
|
Attachment #780736 -
Flags: review?(pchang9)
Updated•11 years ago
|
Attachment #780737 -
Flags: review?(pchang9)
Comment 6•11 years ago
|
||
Fixed on mozilla-central by bug 1022262.
Assignee: nobody → pchang9
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in
before you can comment on or make changes to this bug.
Description
•