On 14/07/2011 12:26, Abdelrazak Younes wrote:
On 14/07/2011 12:03, Abdelrazak Younes wrote:
On 14/07/2011 10:14, Abdelrazak Younes wrote:
On 14/07/2011 08:37, John McCabe-Dansted wrote:
Anyway: I have reproduced the increase in memory use with =rel as
well. It appears to be caused by the additions to
lib/layouttranslations. Does LyX make an in memory copy of the
translations for every inset?
I had a look at the code and it doesn't seems so.
LyX appears to be using a lot of memory,
almost 100k per note inset. We could easily fit one copy of
lib/layouttranslations per LyX-note into that amount of memory.
Total number of lines, insets: 8192,
38163:
5.13user 0.47system 0:15.18elapsed 36%CPU (0avgtext+0avgdata
790768maxresident)k
Size of layouttranslations 40k
Memory use / note inset: 96k
38162:
3.90user 0.32system 0:14.88elapsed 28%CPU (0avgtext+0avgdata
382272maxresident)k
Size of layouttranslations: 28k
Memory use / note inset: 46k
I guess this is worth being investigated...
... and I can't find anything. The memory increase is a kbytes per
LyX Note inserted via copy&paste&paste&...
But when I use the menu bar there's a jump of about 100k. So this is
unrelated to insets. There seems to be a memory leak in the menubar
code because merely clicking the "Insert" menu adds 100k.
This is due to this:
http://bugreports.qt.nokia.com/browse/QTBUG-11070
basically, the submenus are never deleted...
Fixed.
Author: younes
Date: Thu Jul 14 13:10:13 2011
New Revision: 39299
URL:http://www.lyx.org/trac/changeset/39299
Log:
Fix memory leak: submenus were never deleted because QMenu::clear() only
deletes the QActions