After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 495073 - Ignore duplicate SpellError objects
Ignore duplicate SpellError objects
Status: RESOLVED FIXED
Product: GtkHtml
Classification: Other
Component: Editing
3.17.x
Other Linux
: Normal normal
: ---
Assigned To: gtkhtml-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2007-11-08 18:54 UTC by Matthew Barnes
Modified: 2007-11-22 15:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (2.83 KB, patch)
2007-11-08 18:57 UTC, Matthew Barnes
none Details | Review
Revised patch (3.10 KB, patch)
2007-11-08 19:01 UTC, Matthew Barnes
committed Details | Review

Description Matthew Barnes 2007-11-08 18:54:48 UTC
Forwarding this from a downstream bug report:
http://bugzilla.redhat.com/show_bug.cgi?id=353121

Possibly related to bug #257930, bug #272988, bug #347558, and bug #355481.

Dan Williams reported and investigated this, I just fixed up his original patch.

---

Don't add the same SpellError object to a line's spell_errors list.  Works
around whatever bug causes gtkhtml3's memory usage to balloon in certain
situations where it adds millions of duplicate SpellError objects to a line's
spell_errors list.  Keep the list sorted when merging objects too.

(See the downstream bug for further discussion.)
Comment 1 Matthew Barnes 2007-11-08 18:57:14 UTC
Created attachment 98779 [details] [review]
Proposed patch

Based on Dan's original patch.  Seems to work for me but hard to tell if it solves the resource consumption problem.
Comment 2 Matthew Barnes 2007-11-08 19:01:48 UTC
Created attachment 98780 [details] [review]
Revised patch

First patch was slightly out of date.  This revision comments the logic in merge_spell_errors().
Comment 3 Srinivasa Ragavan 2007-11-22 04:37:58 UTC
Matt, sounds fine to me. commit to stable/head.
Comment 4 Matthew Barnes 2007-11-22 15:05:09 UTC
Committed to trunk (revision 8631) and gnome-2-20 branch (revision 8632).