! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Undo uses a crapload of ram
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Mousepad
Component:
General

Comments

Description Erik Harrison 2007-01-10 21:07:57 CET
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Build Identifier: 

The most common undo case is an INS. Since we store the contents of an INS in the str field in the UndoInfo struct, we wind up storing all the work done on a document twice in memory - one in the undo_stack, broken up into pieces, and again in the buffer itself

However, since an insertion is undone by a deletion, the only reason to fill the str field in the UndoInfo struct for a INS is so that it can be redone. We can fill the field on the fly from data in the buffer when the undo is processed.

Alter undo_append_undo_info (or its spiritual decedent) so that it doesn't store anything in the str field during an insert.

Reproducible: Always
Comment 1 Andre Miranda editbugs 2013-10-15 06:18:58 CEST
I guess this bug was smashed when Mousepad adopted GtkSourceView(AKAIK it has undo/redo out of the box). Please check.
Comment 2 Matthew Brush editbugs 2013-10-27 00:41:40 CEST
Yeah, the GtkSourceUndoManager stuff is totally different. If it still happens it should be filed against GtkSourceView.

Bug #2737

Reported by:
Erik Harrison
Reported on: 2007-01-10
Last modified on: 2013-10-27

People

Assignee:
Matthew Brush
CC List:
3 users

Version

Version:
Unspecified
Target Milestone:
Mousepad 0.4.x

Attachments

Additional information