Wasted work in AffixMgr::defcpd_check()

RESOLVED FIXED in mozilla33

Status

()

defect
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: pchang9, Assigned: pchang9)

Tracking

({perf})

Trunk
mozilla33
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fixed-in-hunspell-1.3.3])

Attachments

(1 attachment)

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  simple one-line patches that fixes it.

In method AffixMgr::defcpd_check() in extensions/spellcheck/hunspell/src/affixmgr.cpp, the loop on line 1448 should break immediately after "ok" is set to "1". All the iterations after "ok" is set to "1" do not perform any useful work, at best they just set "ok" again to "1".



Expected results:

Break loop after "ok" is set to "1".
Keywords: perf
Version: 19 Branch → Trunk
Component: Untriaged → Spelling checker
Product: Firefox → Core
Attachment #779562 - Flags: review?(nemeth)
Attachment #779562 - Flags: review?(caolanm)
looks reasonable to me, checked in now to upstream hunspell HEAD
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #779562 - Attachment is patch: true
Attachment #779562 - Flags: review?(nemeth)
Attachment #779562 - Flags: review?(caolanm)
Whiteboard: [fixed-in-hunspell-1.3.3]
Fixed on mozilla-central by bug 1022262.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Assignee: nobody → pchang9
You need to log in before you can comment on or make changes to this bug.