Closed Bug 896301 Opened 6 years ago Closed 5 years ago

Wasted work in SfxEntry::checkword()

Categories

(Core :: Spelling checker, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: pchang9, Assigned: pchang9)

References

Details

(Keywords: perf, Whiteboard: [fixed-in-hunspell-1.3.3])

Attachments

(1 file)

Attached patch Suggested patchSplinter Review
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0 (Beta/Release)
Build ID: 20130316161634

Steps to reproduce:

The problem appears in changeset 138350:18467a85acf6. I have attached  a simple one-line patche that fixes it.

In method "SfxEntry::checkword()" in
extensions/spellcheck/hunspell/src/affentry.cpp, the loop on line 704 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".
Keywords: perf
Version: 19 Branch → Trunk
Component: Untriaged → Spelling checker
Product: Firefox → Core
Attachment #779015 - Flags: review?(nemeth)
Attachment #779015 - Flags: review?(caolanm)
yup, its a good fix, checked in upstream to hunspell HEAD
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #779015 - Attachment is patch: true
Whiteboard: [fixed-in-hunspell-1.3.3]
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Attachment #779015 - Flags: review?(nemeth)
Attachment #779015 - Flags: review?(caolanm)
Let's hold off on resolving this until the in-tree copy of Hunspell is updated. I'll make sure this bug is marked as depending on the eventual "update Hunspell to 1.3.3" bug once it is released.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee: nobody → pchang9
Fixed on mozilla-central by bug 1022262.
Status: REOPENED → RESOLVED
Closed: 6 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.