guitone

Issue 188: Memory usage in the diff view

Reported by Thomas Keller, Sep 13, 2011

Browse the revision 76e40d0c7a53b8934a32f2bee6b20f6e9bba59d2 of the 
monotone repository in guitone.

(web: 
https://code.monotone.ca/p/monotone/source/commit/76e40d0c7a53b8934a3
2f2bee6b20f6e9bba59d2/)

Richard Hopkins reported for that:

* as soon as i double click monotone.texi to open the diff window, 
the PRivate Bytes counter shoots up and continues going to 1.5 GB, 
then closing the diff window the Private Bytes stays at 1.5GB

* then double cliking the file below it (std_hooks.lua), Private 
Bytes started going to down from 1.5GB to 20MB (normal), then back 
up again to 1.6 GB, then back down to 20MB then up to 40MB, then the 
contents appeared in the diff window

* then closing that file, and diffing the next one 
"func/trust_hooks...", Private Bytes goes down to 20MB and 
shows the contents

Comment 1 by Thomas Keller, Sep 14, 2011

I could reproduce this issue with Qt 4.7.3 on Mac OS X.

As minimal use case just clone the mtn repository and execute

$ ./guitone exec path/to/monotone.mtn showFileDiff 
'doc/monotone.texi' 5bfdedba0571477ec41755bc60db55402bb5d5f0 
76e40d0c7a53b8934a32f2bee6b20f6e9bba59d2

From what I have seen this is something inside Qt (again), because 
the diff parsing and applying is through from my side and guitone is 
just waiting for Qt to render the model appropriately. I have to 
rebuild with a debug version of Qt at first to see what is really 
going on:

#0  0x0000000100b2fec8 in QAlgorithmsPrivate::qReverse<int*> 
()
#1  0x0000000100b300c2 in QAlgorithmsPrivate::qMerge<int*, int 
const, qLess<int> > ()
#2  0x0000000100b300de in QAlgorithmsPrivate::qMerge<int*, int 
const, qLess<int> > ()
#3  0x0000000100b30196 in 
QAlgorithmsPrivate::qStableSortHelper<int*, int, qLess<int> 
> ()
#4  0x0000000100b30196 in 
QAlgorithmsPrivate::qStableSortHelper<int*, int, qLess<int> 
> ()
#5  0x0000000100b301a7 in 
QAlgorithmsPrivate::qStableSortHelper<int*, int, qLess<int> 
> ()
#6  0x0000000100b30196 in 
QAlgorithmsPrivate::qStableSortHelper<int*, int, qLess<int> 
> ()
#7  0x0000000100b30196 in 
QAlgorithmsPrivate::qStableSortHelper<int*, int, qLess<int> 
> ()
#8  0x0000000100b30196 in 
QAlgorithmsPrivate::qStableSortHelper<int*, int, qLess<int> 
> ()
#9  0x0000000100b301a7 in 
QAlgorithmsPrivate::qStableSortHelper<int*, int, qLess<int> 
> ()
#10 0x0000000100b30196 in 
QAlgorithmsPrivate::qStableSortHelper<int*, int, qLess<int> 
> ()
#11 0x0000000100b30196 in 
QAlgorithmsPrivate::qStableSortHelper<int*, int, qLess<int> 
> ()
#12 0x0000000100b28f19 in 
QSortFilterProxyModelPrivate::sort_source_rows ()
#13 0x0000000100b29139 in 
QSortFilterProxyModelPrivate::create_mapping ()
#14 0x0000000100b297d8 in QSortFilterProxyModel::hasChildren ()
#15 0x0000000100adc5c2 in QTreeViewPrivate::hasVisibleChildren ()
#16 0x0000000100ae5eb4 in QTreeViewPrivate::layout ()
#17 0x0000000100ae9acd in QTreeView::doItemsLayout ()
#18 0x0000000100ae3a99 in QTreeView::verticalOffset ()
#19 0x0000000100aa82f0 in QAbstractItemViewPrivate::contentsOffset 
()
#20 0x0000000100608b7c in QWidgetPrivate::paintBackground ()
Status: Accepted
Owner: tommyd

Created: 13 years 2 months ago by Thomas Keller

Updated: 13 years 2 months ago

Status: Accepted

Owner: Thomas Keller

Labels:
Type:Defect
Priority:Critical

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status